Home > SQLServer > Run SSMS as different Windows user

Run SSMS as different Windows user

When connecting to a server from SSMS using Windows Authentication, you are limited to using only user which you used to log on to Windows. For example, if you login using User1 on Windows and launch SSMS, you can only use User1 to connect to a server from SSMS as shown below, the User name box is grayed out:

image

To use a different user without logging of and logging in as different user on Windows, you can use RunAs command to launch an application under different user’s context.

The general syntax for RunAs is as follows:

RunAs /user:DOMAIN\UserName ProgramName

 

To Run SSMS as different Windows user:

1. Go to Start -> Run,

2. Type following command in text box and press enter, this will launch command prompt to get user’s password:

image

3. Provide user’s password and press enter:

Enter the password for VGAJJAR\User2:

 

This will launch SSMS under User2‘s context.

 

Using this method you can run multiple instances of SSMS side-by-side under different user contexts:

image

 

To get more information about RunAs parameters, type RunAs /? at command prompt.

Hope This Helps!

Vishal

If you like this post, do like my Facebook Page -> SqlAndMe
EMail me your questions -> Vishal@SqlAndMe.com
Follow me on Twitter -> @SqlAndMe

About these ads
Categories: SQLServer
  1. Drew Jones
    April 24, 2012 at 8:25 pm

    I often need to run under user credentials that belong to a customer domain from my laptop (that is part of my consulting company’s domain). I find that the sysinternals tool shellrunas lets me do this nicely. First, it has a “net only” option which means “only present these credentials to other computers, ie on the network”. Also, it allows you to right click an application shortcut and choose “run as – net only” and then prompts for creadentials. Here is a link to the utility: http://technet.microsoft.com/en-us/sysinternals/cc300361

  1. No trackbacks yet.

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

Follow

Get every new post delivered to your Inbox.

Join 273 other followers

%d bloggers like this: