|
Posted by Roy Harvey on 08/10/07 20:23
On Thu, 09 Aug 2007 21:23:07 -0000, mcolson <mcolson1590@gmail.com>
wrote:
>When I use the xp_cmdshell to try and run the bat file, i get an
>output saying access denied. It should be noted that I am using sql
>server 2005 express. Is this why. When I try to copy the file to
>another location, i get 0 copied. I am able to dir the directory just
>fine.
I am not familiar with Express, but I don't think it is any different
in this area. What is important to remember is that any command run
through xp_cmdshell is running under the account designated for that,
and that is the account that needs the permissions. Running
xp_cmdshell 'set' and inspecting the results should tell you the
account being used.
While it does not appear to be your problem it is worth noting also
that xp_cmdshell runs in a context without any mapped drives, so any
files on a network drive must be referenced using a UNC path of the
form \\servername\sharename\folder...
Roy Harvey
Beacon Falls, CT
Navigation:
[Reply to this message]
|