Tip: Using a different Windows user to log on to SQL Server rather than the current one used for Windows

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 Sad smile.

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 Smile. Here are steps:

  1. Find SSMS from Start –> All Programs –> Microsoft SQL Server 2005/2008 2008 R2 –> SQL Server Management Studio (The same procedures for other client tools).
  2. 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:
    image
  3. 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

Advertisements

About Alex Feng

SQL Server DBA in Alibaba Cloud Computing
This entry was posted in SQL Server Authentication and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s