xp_cmdshell issues.... please assist!

  • Hi there,

    I am having an issue with the xp_cmdshell command in sql server. I have a batch file I need to execute on a remote server \\myservernamehere\D$ ... I tried doing the cmdshell with the UNC path and it said it couldn't find the specified path. I also tried a couple other things with it and it said UNC paths are not supported.

    So, I remoted into the server and mapped the network path to a local drive on the server. I had to specify a username and password to do the mapping. I mapped it to K:\

    I can click start > run > cmd on the server and get to the K:\ drive there. When I go back to my desktop and try to execute the cmdshell from my stored procedure it still says it cannot find the drive specified.

    I have tested it doing other things... I can see the c: drive and the d: drive on the server via the xp_cmdshell (so I know it isn't a sql permission thing with the cmdshell) ...

    What am I doing wrong? Is the cmdshell incapable of running something on a network share? I'm really desperate to get this fixed.... any help is appreciated.

    We are running SQL Server 2000.

  • Does this batch file you are trying to run on a remote server, run ON the remote server or just FROM the remote server?

  • It runs on the remote server. Its a java app. I believe I figured out the problem though... its because sql is running under "localsystem" and it doesn't have permissions on that network drive... so..... now I'm running into a problem because to change what account our server is running on is not simple.

  • That can do it. Let us know if changing to a domain accout solves the problem.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply