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 2005 Forums
 High Availability (2005)
 Schedule to restore DB

Author  Topic 

jung1975
Aged Yak Warrior

503 Posts

Posted - 2007-04-20 : 01:42:59
How can I retore the DB in a scheduled job?
also, I wuould like to rollback the transaction if the job faiils so that it keeps the original data in case the restore gets failed...
Can you show me the script examples?


Kristen
Test

22859 Posts

Posted - 2007-04-20 : 02:34:05
Restore syntax example see here:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=RESTORE%20syntax%20/%20example

You can't do a RESTORE and then ROLLBACK if it fails .... you would have to have a Backup available, and Restore from that.

Kristen
Go to Top of Page
   

- Advertisement -