Connect to SQL Server using Management Studio using Windows Authentication

I work with Management Studio, and I want to log in to databases located on another server in a different domain. The only login I have is Windows credentials.

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

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

While this works, this is not the easiest or most enjoyable way. Is there a better way? How can I do this in Management Studio?

+6
source share
3 answers

The only elegant ways to connect to SQL Server in a different domain, but still using Windows authentication:

  • What are you already doing: runas /netonly
  • Connect via Remote Desktop and open SSMS locally on the remote server
+3
source

In addition to the other answers you received, you can also right-click on an executable file or shortcut on one and in the final context menu, it should be possible to run as another user. I tried this on my Win 7 machine. I seem to remember that in XP I had to install ShellRunAs to display these parameters.

+1
source

You can get a graphic password hint by downloading ShellRunAs or better yet, the entire Sysinternals Suite .

  • Save the executable for ShellRunAs or Sysinternals Suite in the location of your choice. I recommend:

     C:\Program Files\Sysinternals 
  • Then you can enable the "Run as another user ..." context menu for all applications / shortcuts by running

     shellrunas /reg 

    Run as different user

  • If you want to enable this only for SQL Server Management Studio, you can create a shortcut for it and pass the path to the management studio as follows:

     "C:\Program Files\Sysinternals\ShellRunas.exe" "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" 

If you download the entire Sysinternal Suite, I would recommend that you add the directory to the PATH environment variable .

Note that you will need to configure the above paths based on your version of SQL Server Management Studio and whether to use 64-bit or 32-bit Windows.

0
source

Source: https://habr.com/ru/post/949945/


All Articles