By default, when we log on to SQL Server using SSMS (SQL Server Management Studio) or other client tools by choosing Windows Authentication Mode, it will use our Windows user credential currently logged on to Windows. This is not a problem if we just want to use this user. However, sometimes, we want to use another one rather than this one. For instance, we create a new SQL Server login from Windows user and we want to do some tests using this new created one.
One way to do this, is logging on to Windows using this new created user therefore it will be used when connecting to SQL Server by using Windows Authentication Mode. However, it sounds not convenient way, as we might log on/off to Windows using different users multiple times if we have more tests to do .
I would recommend another option that is by running SSMS (or other client tools) as a different user which is easy to do and easier for us to perform tests . Here are steps:
- Find SSMS from Start –> All Programs –> Microsoft SQL Server 2005/2008 2008 R2 –> SQL Server Management Studio (The same procedures for other client tools).
- Press “Shift” key (don’t release), right-click on the SQL Server Management Studio and select “Run as different user” option from pop-op options. See the screenshot below:
- Input a different Windows user in the “Windows Security” dialog, and you should be able to see this user is shown in the SSMS “Connect to Server” dialog if Windows Authentication Mode has been chosen.
Hope this helps