SQL Server Performance Forum – Threads Archive
Can serveral logs be restored at a time?I’ve got everything working to copy and restore the DB and the transation logs to my standby server, if only one transaction log exists in the directory.
The logs are generated on the production server with time stamps. But, the link between the production and standby servers can become unavailable and 2 or 3 log files queue up on the production server. After the link auto reconnects all the transaction logs are transfered to the standby server (usually 2 or 3 but it could be as many as 23). Is there a way to restore all the time stamped transaction log files located in a single directory, with a single statement? If it is possible, could you give an example? If not, would you have a suggestion on how to restore multiple transaction logs? TIA
I understand that transaction logs must be restored sequentially in the order they were created. I can do this manually with EM.<br /><br />My question was: If it is possible; What statement can be used to restore any number of transaction logs??<br /><br />And if a number of time stamped transaction logs cannnot be restored with a single statement: How can I automate the restore of multiple transaction logs??<br /><br />The reason for doing this is simply self preservation: I don’t want to be paged in the middle of the night to run EM on the standby server, to manually restore a couple transaction logs. In the middle of the night sleeping is a better use of my time. <img src=’/community/emoticons/emotion-1.gif’ alt=’‘ /><br />TIA<br />Ceje
You have to restore sequentially. What we have done is record the transaction (and full) backups in a table. We mark as started, completed, or failed. The receiving server just reads the table for complete and restores in sequential order. It marks each as restored during the process. MeanOldDBA
[email protected] When life gives you a lemon, fire the DBA.
Thank you for your help Derrick. I’ll guess I’ll have to write a script to pull the logs in one at a time.