SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Database Restore Automation


Database Restore Automation

Author
Message
Paul Brewer
Paul Brewer
SSC-Addicted
SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)

Group: General Forum Members
Points: 431 Visits: 1299
Comments posted to this topic are about the item Database Restore Automation
artilugio
artilugio
SSC-Enthusiastic
SSC-Enthusiastic (122 reputation)SSC-Enthusiastic (122 reputation)SSC-Enthusiastic (122 reputation)SSC-Enthusiastic (122 reputation)SSC-Enthusiastic (122 reputation)SSC-Enthusiastic (122 reputation)SSC-Enthusiastic (122 reputation)SSC-Enthusiastic (122 reputation)

Group: General Forum Members
Points: 122 Visits: 159
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?)
Paul Brewer
Paul Brewer
SSC-Addicted
SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)

Group: General Forum Members
Points: 431 Visits: 1299
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search