Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Start Enterprise Manager as different user 1

Status
Not open for further replies.

arst06d

Programmer
Nov 29, 2002
324
Hi

If you right-click on the Enterprise Manager icon and choose "Start As" you can start EM as a different userid to that which you logged on to Windows.

Are there any command line options so I can do this automatically from a shortcut?

Thanks
 
Not that I'm aware of. You can set up EM so that every time you start it, it asks for a login, however.

I doubt that's what you want, though.

Sorry I couldn't be more help.





Catadmin - MCDBA, MCSA
"The only stupid question is the one that *wasn't* asked.
 
Yes there are. You can use the runas command to do this from a command line.
Code:
runas /user:DOMAINNAME\OtherUserName "mmc c:\Path\To\EnterpriseManager.msc"
You will then be prompted for the password of the account that you'll be logging in as.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
hi mrdenny and thanks for the info.
I have created a shortcut as follows:
Code:
C:\WINDOWS\system32\runas.exe /user:mydomain\myuserid C:\WINDOWS\system32\mmc.exe /s "C:\Program Files\Microsoft SQL Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC"
All that happens is a cmd window flashes - too quick to see content. When I run the above command in a cmd window, it displays the help for the RUNAS command.
 
Sorted this with the following:
Code:
C:\WINDOWS\system32\runas.exe /user:MYDOMAIN\MYUSERID "mmc.exe /s \"C:\Program Files\Microsoft SQL Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC\""

Works a treat.
 
Yep, you have to escape the double quotes in the command line.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top