Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 copy backup to another server

Author  Topic 

denise
Starting Member

14 Posts

Posted - 2006-07-12 : 12:13:32
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

30421 Posts

Posted - 2006-07-12 : 14:50:24
xp_cmdshell


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-07-12 : 14:56:54
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
   

- Advertisement -