By: Jugal Shah | Updated: 2010-11-12 | Comments (3) | Related: > SQL Server Management Studio
Problem
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.
Solution
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:
Step 1:
Click Start, point to All Programs, and then point to SQL Server Management Studio.
Step 2:
Right-click SQL Server Management Studio and then click Properties.
Step 3:
In the Start in box, change the value from %HOMEDRIVE%%HOMEPATH% to value %WINDIR%. and Click OK as shown below.
Step 4:
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.
Next Steps
- 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
About the author
This author pledges the content of this article is based on professional experience and not AI generated.
View all my tips
Article Last Updated: 2010-11-12