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:domainsqluser "C:Program FilesMicrosoft SQL Server100ToolsBinnVSShellCommon7IDESsms.exe"

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

Attempting to start C:Program FilesMicrosoft SQL Server100ToolsBinnVSShellCommon7IDESsms.exe as user "domainsqluser" ...

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s