June 28, 2004 at 10:39 am
I am using xp_cmdshell to call an FTP batch file. The batch file itself references a network directory via its UNC. When I run the batch file alone (outside of Sql Server) on the database server it runs fine. However, when I try to run it using xp_cmdshell inside a stored proc - it fails on the UNC share. I've even tried mapping the share to a network drive and changing the FTP batch file to use the mapped drive - still fails using xp_cmdshell.
My database server, and the file server the FTP batch file is referencing are both Win2K machines - we recently switched to active directory services.
Can anyone help me figure out a workaround?
Thanks!!
June 28, 2004 at 11:50 am
Make sure the account that you are using for the SQL Server Services and Agent (if you are scheduling it as a job) has access to the UNC share.
Hope that help!
June 29, 2004 at 1:39 am
Only users with sysAdmin rights can execute xp_cmdshell from the database or job. Another method is create a windows ID and register it as a domain user and then use that ID to execute xp_cmdshell.
Regards, kokyan
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy