SQL SMSS connect as another Windows NT user

I tried to find out how to connect through SMSS to SQL server as another domain user.
You must run SMSS as “RUN AS..”

so the code is as follows:
runas /netonly /user:domain\user “C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe”


Due to version changes:

%windir%\System32\runas.exe /netonly /user:domain\user “C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe -S SERVER”


When you use the “/netonly” switch, you can log in using remote credentials on another domain which you are not member of, even if there’s no trust set up.
Runas uses credentials for accessing remote resources. The application interacts with the local computer as the current user, and interacts with remote computers as the user you’ve given.

After that, jus connect through your SMSS and run “SELECT SUSER_NAME,SYSTEM_USER” and you will see that you are under the login you specified.

Or in a new query you can write
execute as login=’DOMAIN\user’

Good Luck

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.