Database Restore Automation

  • Comments posted to this topic are about the item Database Restore Automation

  • hi this is interesting!

    Quick question: if you have multiple restores, are they launched at the same time (so that the overall time will be the one that takes the longest?)

  • The T-SQL procedure can generate restore scripts for either:

    1. A single user database (this is how the PoSh driver script calls it)

    2. All user databases (the default if you just run 'EXEC dbo.sp_LogShippingLight' , no parms)

    3. All user databases + system databases (@IncludeSystemDBs = 1)

    The restore script constructed and returned is sequenced by backup finish time and LSN, the sequence is obviously important. You could copy/paste the individual TSQL restores commands (FULL, DIFF, LOG, WITH RECOVERY, CHECKDB etc) associated with individual databases to different query analyser sessions and run them concurrently, manually.

    The PowerShell drive script is less flexible, one user database at a time. You could in theory invoke the PoSh driver script multiple times, simultaneously, for different databases, I think it would work but haven't tried it to be honest. It's a great suggestion for the next version - 'PowerShell Driver to execute concurrent restores to a standby server for all user databases' - IE remove the single DB limitation and run restores in multiple threads.

    Thanks and regards

    Paul

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply