Issues with Run As to Start SQL Server Management Studio with a Different Login
By: Jugal Shah | Updated: 2010-11-12 | Comments (3) | Related: More > SQL Server Management Studio
As a best practice in the industry, a DBA often has two logins that are used to access SQL Server; one is their normal Windows login and the other is an admin level login account which has sysAdmin rights on the SQL Server boxes. In addition, most of the time the SQL Server client tools are only installed on the local desktop and not on the servers. So in order to use the different login to connect to SQL Server using SSMS you need to use the "Run as" feature, but when doing this you may get this error message "The directory name is invalid". In this tip we look at how to resolve this issue.
As mentioned above when using the "Run as" feature you may get this error message: "The directory name is invalid" as shown below.
The reason this occurs is if the "Start in" property is set to %HOMEDRIVE%%HOMEPATH% on the Shortcut tab of the SSMS Properties dialog box. In Windows XP and Windows Server 2003, we cannot use the "Run as" feature to access the logged in user's mapped home drive.
To fix this problem we can do as follows:
Click Start, point to All Programs, and then point to SQL Server Management Studio.
Right-click SQL Server Management Studio and then click Properties.
In the Start in box, change the value from %HOMEDRIVE%%HOMEPATH% to value %WINDIR%. and Click OK as shown below.
Right Click on SQL Server Management Studio and Click on "Run as", if the Run as option does not come up press Shift and Right Click. At this point, specify the login account you want to use and SSMS should work for you.
- You can also use this solution with other programs such as Internet Explorer, and other tools if you are facing this kind of issue.
- Take a look at these other tips about SQL Server Management Studio
Last Updated: 2010-11-12
About the author
View all my tips