issues logging using SQLCMD

  • 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.

  • 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?

  • 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

  • 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?

  • 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.

  • 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..

  • what is the error message and error details?

    eg

    error 18456, serverity 14, state 11

    failed to login due to a problem

  • Benki Chendu (4/30/2012)


    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..

    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