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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xp_cmdshell can't see local drive

Status
Not open for further replies.

mkal

Programmer
Jun 24, 2003
223
US
I have a Windows 2008 R2 X64 Std Edt. and SQL 2008 (Developer Edt.) SP1 server.

When I open SSMS and run the following queries:

exec xp_cmdshell 'dir C:\'

exec xp_cmdshell 'dir F:\'

exec xp_cmdshell 'dir E:\'

The first two (C: and F:) work fine but the last (E:) gives the message: "The system cannot find the path specified." I can however open a command prompt and navigate the E:\ drive no problem and Windows Explorer can also navigate the drive. The permissions on all three drives are the same. The account that runs the MSSQL service is a local admin on the server. I've tried rebooting the box and also tried assigning the everyone group full control but nothing seems to work. The really weird part is that this worked fine yesterday.

Any idea would be welcomed.
 
What results do you get when you run this?

Code:
xp_fixeddrives


-George
Microsoft SQL Server MVP
My Blogs
SQLCop
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Well I feel a bit foolish here, just realized I wasn't connected to the correct instance of SQL. Once I changed the connection everything worked fine.

By running the xp_fixeddrives that's what tipped me off.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top