Connect Different Windows User in SQL Server Management Studio (2005 or Later)

Possible to log into another Windows account using SQL Server Authentication?

No. 'SQL Server Authentication' works only with SQL Server logins, it won't work with a NT login. To log in as another credential have the process run as the credential you desire to run as. Use runas, most likely you want to run SSMS like this:

runas /netonly /user:domain\user "c:\program files\...\ssms.exe"

By specifying the /netonly argument your SSMS will run with the desired NT credential only for remote hosts, locally will have your local credentials. This not only preserves your SSMS environment (last used files, options etc) and doesn't require domain\user to have local priviledges, but, more importantly, it works even for a completely unrelated domain. That is if you machine is in domain foo (or not even joined to the domain) and the desired runas is in domain bar, the runas /netonly /user:bar\user ... will run just fine.

The /netonly trick works only if the SQL server host you are connecting to is remote (not on the same machine). If is local, then your runas must be locally using the desired credential, so remove the /netonly argument.

Can't change the logon into SQL SSMS

Find where you have management studio installed on your machine (ssms.exe)

Hold down the shift key and right click it. In the pull down menu you will see the option to run it as a different user.

The shift-right click combo to run as a different user is available for executables and there are registry modification available for Windows 10 users launching apps that do not run for a legacy ".exe"

SQL Management Studio can't change Windows Auth User (not express)

You need to use runas .. netonly when starting up SSMS to use Windows Authentication with different credentials (You might need to change the path to the executable depending upon what version you are on)

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

NB: To future readers if you get a generic "invalid credentials" type message when trying this please read the comments trail below!

Can't connect to SQL Server in different domain using SSMS and Windows 7 Credential Manager

It looks like there is a bug in the Windows 7 Credential Manager that causes this behavior. After lots of Internet research, I found some ugly workarounds, but also found a great one:

In Credential Manager, add an entry for the remote server, but instead of adding just the server name, like database.contoso.com, add the server name with the SQL Server port, like so:

database.contoso.com:1433

This results in the desired behavior, with no pain!

Source: http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/c05a90e4-cb16-46f6-9072-37083c65696d/

Also remember, of course, that you need to prefix the remote username in Credential Manager with the remote domain name, like so:

database\administrator

Set up SQL Server to be accessible by all computers on a network via program manipulation


any computer running this application to be allowed to communicate with SQL Server

The normal configuration to enable this is:

1) The SQL Server must be running on a server joined to the domain.

2) The SQL Server is configured to use TCP/IP and listen on port 1433.

3) The other computers are also joined to the domain.

4) The users logged in on the other computers are added as Windows logins. in SQL Server, and mapped to users in the desired databases (can use groups instead of individual users).

See eg: How to add Active Directory user group as login in SQL Server

connect to remote sql server with different windows credentials

Right click the application and choose "Run as different user".

If you are on Vista or Win7, you may need to look at ShellRunAs to create the menu option in your windows shell.



Related Topics



Leave a reply



Submit