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)
 automate backup and restore

Author  Topic 

peera
Starting Member

11 Posts

Posted - 2003-10-13 : 15:29:26
what would be the best way to automate backup and restore a db in a different box(kind of stand by server)
thx

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-10-13 : 15:32:29
You could create a job to do this. The job would copy the backups from the source server then restore the backup or transaction log on the standby server.

xp_cmdshell 'copy \\SourceServer\F$\MSSQL\Backup\Today.bak F:\MSSQL\Backup\'

RESTORE DATABASE SomeDB
FROM 'F:\MSSQL\Backup\Today.bak'
WITH REPLACE, RECOVERY

Tara
Go to Top of Page
   

- Advertisement -