Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect to SQL Server with Management Studio using Windows Authentication

I am working with Management studio and I want to log in to databases located on another server in another domain. The only login I have for such is with Windows credentials.

I want to be able to log in via Management Studio on my local PC. I have found the only way to do so is using a command similar to:

runas /netonly /user:domain\username "C:\Progr...\IDE\Ssms.exe"

While this works, it isn't the easiest or nicest way. Is there a better way? Any way I can do it within Management Studio?

like image 603
amateur Avatar asked Jul 21 '13 20:07

amateur


2 Answers

In addition to the other answers you've received, you can also shift-right click on an executable or a shortcut to one and in the resulting context menu, there should be an option to run as a different user. I tried this on my Win 7 machine. I seem to recall that in XP, I had to install ShellRunAs for these options to show up.

like image 24
Ben Thul Avatar answered Nov 15 '22 00:11

Ben Thul


The only elegant ways to connect to a SQL Server in another domain but still use Windows Authentication are:

  • What you're already doing: runas /netonly
  • Connecting via remote desktop and opening SSMS locally on the remote server
like image 116
Aaron Bertrand Avatar answered Nov 15 '22 02:11

Aaron Bertrand