Shortcut: Running SQL Server Management Studio as someone else

Shortcut: Running SQL Server Management Studio as someone else

You don’t always want to run SQL Server Management Studio (SSMS) as your current login for Windows.

Now if all you want to do is to use a SQL Server login, then that’s easy. When you connect to a server in Object Explorer, or when you start a new Database Engine query, you can just choose SQL authentication instead.

But three other scenarios commonly occur.

If you need to run SSMS as an administrator on a machine with UAC, you can do this:

You right-click the link to SSMS and choose Run as administrator.

Another option is that you need to run as another user ie: not just an administrator. If you are using Windows 10, the way to do this is to hold the Shift key before you right-click the SSMS link. Then you see this instead:

And you can then choose the Run as a different user option to log on as someone else just for this one application.

The third scenario is when you are needing to make a Windows authenticated connection to a server, but from a system that is not part of the domain. In that case, you need to run SSMS from the command line like this:

runas /netonly /user:targetdomain\targetusername "C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\VSShell\Common7\IDE\Ssms.exe"

You will need to modify that command to point to the current location of Ssms.exe for the version that you are running.

You will then be prompted to log on to the domain.

2018-05-11