April 30, 2012 at 5:15 am
Does SQLCMD support windows authentication?
I am trying to login to a database using sqlcmd but my windows authentication is failing. I created a test SQL login with same credentials and thats working in sqlcmd.
April 30, 2012 at 5:18 am
yes SQLCMD does allow Windows Authentication, are you using the -E switch to force a trusted connection?
can you login to the server using SSMS to the same server ok?
April 30, 2012 at 5:40 am
no..it doesnt work with SSMS also..
But when RDP access is given for that windows user, he is able to use sqlcmd but dangerous thing is, he gets access to all databases..but I have given access to only 1 database for that user
April 30, 2012 at 5:43 am
you granting them as an administrator on the server for RDP access? if so you are also giving them SA access as BULTIN\Administrators in SQL 2005 is a system admin on SQL as default.
have you created the user as a login to connect and also as a user in the DB?
April 30, 2012 at 5:57 am
Benki Chendu (4/30/2012)
no..it doesnt work with SSMS also..But when RDP access is given for that windows user, he is able to use sqlcmd but dangerous thing is, he gets access to all databases..but I have given access to only 1 database for that user
Please post the error message you are receiving.
Don't grant RDP (or any extra) access.
April 30, 2012 at 5:59 am
Some of my team mates had accidentally given the sysadmin for the user.:-D
Now, I revoked it.
Now, its so confusing here. When RDP rights are revoked, sqlcmd is not working for that user..
very weird..
April 30, 2012 at 6:01 am
what is the error message and error details?
eg
error 18456, serverity 14, state 11
failed to login due to a problem
April 30, 2012 at 6:09 am
Benki Chendu (4/30/2012)
Some of my team mates had accidentally given the sysadmin for the user.:-DNow, I revoked it.
Now, its so confusing here. When RDP rights are revoked, sqlcmd is not working for that user..
very weird..
Also post your command.
For example:
C:\>sqlcmd -S ServerName\InstanceName -E
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply