June 21, 2005 at 9:09 am
I am stumped!
I have a process encapsulated in a stored procedure that lists out the file names in a directory on a Novell Server. Without getting into the why's, the key step is this:
exec master..xp_cmdshell 'dir \\<servername>\<path>\'
Now, this command works just fine when <servername> is a windows server. And the dir command works just fine from a command prompt for both windows servers and novell servers. I have the SQLServerAgent running under my logon. The sqlserver is running on an XP box. The problem is that the above command does not work if <servername> is a novell server. Note that for the same servername, it works fine from a command prompt. However, using xp_cmdshell returns Access Denied. Another quirk is that this worked fine from my old machine (Windows 2000 Professional) running on the exact same network (Novell Network ).
I have tried everything I can think of, but still can't get this to work.
Any thoughts or ideas?
Gordon
Gordon Pollokoff
"Wile E. is my reality, Bugs Bunny is my goal" - Chuck Jones
June 21, 2005 at 10:06 am
I believe xp_cmdshell runs under the context of the SQLServer service account. You can set a proxy in Enterprise Manager, adn you might want to set this to your account for testing. If that works, get a real service account that you use for this and only this.
June 21, 2005 at 11:03 am
Steve,
You are correct, xp_cmdshell runs under the context of the SQLServer service account. The SQLServer service is set to run under my account, so this does not seem to be the problem. And even setting a proxy did not work. I am stumped. Personally, I think it is some strange XP related issue.
Gordon
Gordon Pollokoff
"Wile E. is my reality, Bugs Bunny is my goal" - Chuck Jones
June 22, 2005 at 11:18 am
You said "Note that for the same servername, it works fine from a command prompt." Do you mean that you can run a dir command on a Windows box to a Novell one? Or do you mean that you can run a dir command directly on the Novell one? When I try it on a Windows machine at a command prompt or using xp_cmdshell I get "The network path was not found." both times. The SQL Server also has the Novell client on it.
I have never gotten an UNC path to work to a Novell server. If you have the Novell client installed on your SQL server you could map a drive to the Novell server, and then you might be able to run a dir command.... haven't tried it though.
You also said "Another quirk is that this worked fine from my old machine". What worked? Do you mean running dir at a command prompt on your pc or using xp_cmdshell from your pc? I'm just curious because like I said, I've never been able to get it to work anywhere 🙂
Linda
June 22, 2005 at 2:46 pm
Running the dir command from a Window's command shell using either the UNC pathname to the Novell box or the map drive letter works fine on my current XP box. Running the same command using xp_cmdshell in queryanalyzer used to work on my old W2K Pro box.
However, running from query analyzer on my current XP box, using the UNC pathname returns Access Denied. Using the mapped drive letter returns something like "The network path was not found".
Gordon Pollokoff
"Wile E. is my reality, Bugs Bunny is my goal" - Chuck Jones
June 22, 2005 at 2:46 pm
Running the dir command from a Window's command shell using either the UNC pathname to the Novell box or the map drive letter works fine on my current XP box. Running the same command using xp_cmdshell in queryanalyzer used to work on my old W2K Pro box.
However, running from query analyzer on my current XP box, using the UNC pathname returns Access Denied. Using the mapped drive letter returns something like "The network path was not found".
Gordon Pollokoff
"Wile E. is my reality, Bugs Bunny is my goal" - Chuck Jones
June 22, 2005 at 2:47 pm
Running the dir command from a Window's command shell using either the UNC pathname to the Novell box or the map drive letter works fine on my current XP box. Running the same command using xp_cmdshell in queryanalyzer used to work on my old W2K Pro box.
However, running from query analyzer on my current XP box, using the UNC pathname returns Access Denied. Using the mapped drive letter returns something like "The network path was not found".
Gordon Pollokoff
"Wile E. is my reality, Bugs Bunny is my goal" - Chuck Jones
June 22, 2005 at 2:48 pm
Running the dir command from a Window's command shell using either the UNC pathname to the Novell box or the map drive letter works fine on my current XP box. Running the same command using xp_cmdshell in queryanalyzer used to work on my old W2K Pro box.
However, running from query analyzer on my current XP box, using the UNC pathname returns Access Denied. Using the mapped drive letter returns something like "The network path was not found".
Gordon Pollokoff
"Wile E. is my reality, Bugs Bunny is my goal" - Chuck Jones
June 22, 2005 at 2:51 pm
Running the dir command from a Window's command shell using either the UNC pathname to the Novell box or the map drive letter works fine on my current XP box. Running the same command using xp_cmdshell in queryanalyzer used to work on my old W2K Pro box.
However, running from query analyzer on my current XP box, using the UNC pathname returns Access Denied. Using the mapped drive letter returns something like "The network path was not found".
Gordon Pollokoff
"Wile E. is my reality, Bugs Bunny is my goal" - Chuck Jones
Viewing 9 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply