Today I am going to show how you can use Windows Authentication With a Different User. Yes, you heard it right, it is possible and it’s one of those Wow factors in SQL Server.
First of all let’s talk about why even someone would need to use the functionality.

Customer may login to their laptop with a different domain account than the account used to connect to SQL Server. This is because of security reasons.

Another situation is customer have different domain account to connect to different SQL Servers. In some organizations this is very common practice.

The below screen shots are of Window 1o and SQL Server 2017.

How to run SSMS as a different user

Create a shortcut of SSMS in taskbar.
Hold Shift Key and right click on the shortcut as shown below:

Windows Authentication With a Different User
Windows Authentication With a Different User
The next screen will need the credentials for the different user:
Windows Authentication With a Different User
Windows Authentication With a Different User

Once you click on Ok the login screen of SSMS will appear with the domain user grayed out just like the way we use windows authentication for normal account (the account used to login to the laptop\desktop).

Windows Authentication With a Different User
Windows Authentication With a Different User

You can open SSMS as a different user without creating a shortcut as well. You need to go to the path of ssms.exe and use the same method.  The file resides in Binn folder of SQL install directory.

Well, you do not have to remember the path. There is an easy way to locate the path as shown below.

Go to Window Search (Windows Key + S) and type SSMS. Right Click on the SSMS icon and choose Open file location.

Windows Authentication With Different User
Open SSMS file Location

This will open the SSMS location of Windows Start Menu as shown below. Again right click and open file location.

Windows Authentication With a Different
Open SSMS file location

This is Open the physical file location of ssms.exe as shown below:

Windows Authentication with Different User
Open SSMS file location

Once you reach here you can use the same method as described above to open SSMS using Windows Authentication with a Different User.

Do you have to do this every time you need to use a different windows authenticated user? Let’s see how we can create different shortcuts for different logins.  Continue Reading>>

Please spread the word:
RSS
Follow by Email
Facebook
Google+
https://sqlgeekspro.com/windows_auth_diff_user/
Twitter
PINTEREST
LinkedIn