Quickly test Windows-auth logon to a SQL DB as a different user

If you need to make a test connection to a MS SQL DB as a different Windows user, and you’re not using SQL authentication, you can do the following:

runas /user:domain\sqluser "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe"

You’ll then see the following messages after being prompted for a password for that user:

Attempting to start C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe as user "domain\sqluser" ...
This entry was posted in SysAdmin, Windows. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>