SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 copy backup to another server
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

denise
Starting Member

14 Posts

Posted - 07/12/2006 :  12:13:32  Show Profile  Reply with Quote
I have a maintenance plan that backs up the database to disk on the server. I would like to add a step to the backup job that will either copy that BAK file to another server, or run a second backup to the other server.
I need help with the command syntax though.
Also what permission would I need on the other server to access it?
Thanks very much for any help.



SwePeso
Patron Saint of Lost Yaks

Sweden
30212 Posts

Posted - 07/12/2006 :  14:50:24  Show Profile  Visit SwePeso's Homepage  Reply with Quote
xp_cmdshell


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
36845 Posts

Posted - 07/12/2006 :  14:56:54  Show Profile  Visit tkizer's Homepage  Reply with Quote
Add a step to the backup job. The second job would run xp_cmdshell using DOS copy or xcopy command. The SQL service on the the server that has the job would need write access to the folder (most likely a share) where you are copying the file to.

EXEC master.dbo.xp_cmdshell 'xcopy E:\MSSQL\Backup\SomeBackupFile.BAK' \\DestinationServer\ShareName\'

Tara Kizer
aka tduggan
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000