TheBugSlayer
Programmer
Hi all.
I have a situation where I have to restore a database to a different location. There are nightly backups, seven days a week, and log backups taken every thirty (30) minutes. On 10/3 the nightly backup failed and on 10/10 the last transaction log backup was taken. We did not realize this until the 25th. I figured we had run out of disk space and when I cleared some, nightly backups started running the 2on 10/29. So On that day the first full backup since 10/2 was successful and the first transaction log backup since 10/10 was successful.
Now, I was asked to restore the database in its state prior to 10/29 to a different location. So I restored the 10/2 backup WITH NORECOVERY and also restored the first transaction log backup on 10/2, WITH NORECOVERY. My concern is, there are 375 log transaction files between 10/2 and 10/10. Do I need to restore every single one of those files? Almost certain the answer is yes. Now, is there a way to perform this task in a batch or some other fast way? At this point I am considering writing a script that will loop through each file restoring it WITH NORECOVERY and the last one WITH RECOVERY.
What I want from you is to validate my method, and to suggest any other way to go restore the DB to the state it was in the 10th.
Thank you!
MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA), Training HOTT cert SQL Server 2012 Business Intelligence (SSIS, SSAS).
I have a situation where I have to restore a database to a different location. There are nightly backups, seven days a week, and log backups taken every thirty (30) minutes. On 10/3 the nightly backup failed and on 10/10 the last transaction log backup was taken. We did not realize this until the 25th. I figured we had run out of disk space and when I cleared some, nightly backups started running the 2on 10/29. So On that day the first full backup since 10/2 was successful and the first transaction log backup since 10/10 was successful.
Now, I was asked to restore the database in its state prior to 10/29 to a different location. So I restored the 10/2 backup WITH NORECOVERY and also restored the first transaction log backup on 10/2, WITH NORECOVERY. My concern is, there are 375 log transaction files between 10/2 and 10/10. Do I need to restore every single one of those files? Almost certain the answer is yes. Now, is there a way to perform this task in a batch or some other fast way? At this point I am considering writing a script that will loop through each file restoring it WITH NORECOVERY and the last one WITH RECOVERY.
What I want from you is to validate my method, and to suggest any other way to go restore the DB to the state it was in the 10th.
Thank you!
MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA), Training HOTT cert SQL Server 2012 Business Intelligence (SSIS, SSAS).