Options

Scripting restore of most recent backup

I have an identical database on two servers. Database on the Server A is production, Server B is reporting. I copy the nightly backup on Server A To Server B and use that as the source for reporting and analysis. I want to script the restore on Server B to use the most recent backup file available. Seem to be able to do that through the GUI, but I don't know how to script it

Hints? Examples?
Tagged:

Answers

  • Options
    J_DJ_D Posts: 3 Bronze 1
    You can do this via the 'Schedule Restore Jobs'function in SQL Backup (I'm on Version 9.2) There's an option there to restore the latest full backup. I've not used it myself but it seems pretty intuitive. 
  • Options
    RichardRayRichardRay Posts: 5 New member
    Thanks, but that s through the GUI, I’m hoping to script it.  Unless, does the GUI offer a way to save a script? I’ll look at that when I get to work...
  • Options
    Eddie DEddie D Posts: 1,780 Rose Gold 5
    Hi, the last step of Scheduled Restore Job wizard is the summary step.  You will find a scripts tab, where you can copy the syntax of the job.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
Sign In or Register to comment.