July 3, 2009 at 12:44 am
Hai guys
how can i transfer backup files from one server to another using xp_cmdshell
wht i am trying to execute is
exec xp_cmdshell 'copy D:\testbackup\*.bak \\ushigmnsrvr\c:\test\backuptest\'
error cmg as network path not found
any rights prob or any configuration needed?
pls help
July 3, 2009 at 12:51 am
You are probably having rights problem.
What is your service start up account? It should preferably be domain account and should have write access to the path.
July 3, 2009 at 12:55 am
Hi,
Are you backing up directly to another system without share or using a share. I hope you are running win2003 or win2000
If you are running using a share snytax should be (here iam assuming the share name as c)
exec xp_cmdshell 'copy d:\testbackup\*.bak \\ushigmnsrvr\c\test\backuptest\'
if you are having a share as mybackup then the syntax should be
exec xp_cmdshell 'copy d:\testbackup\*.bak \\ushigmnsrvr\mybackup\test\backuptest\'
If you are not using any shares then
exec xp_cmdshell 'copy D:\testbackup\*.bak \\ushigmnsrvr\c$\test\backuptest\'
I recommend you to use shares. And also make sure that the service account under which the sql server runs has permissions on the destination drive or share.
[font="Verdana"]Thanks
Chandra Mohan[/font]
July 3, 2009 at 1:07 am
Pls Ignore my message. I did not notice the path you used.
What Chandra said is correct. The problem is with the share name. After that you sort out the rights issue.
July 3, 2009 at 5:04 am
thanks yaar thanks a lot.its done
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply