May 7, 2009 at 8:30 am
Hi guys,
I just have a simple question.
I have a situation whiere there are jobs running every 15 minutes for log backups.
I am aware that if I take a log backup it would truncate the log, and a new sequence of LSN would start.
I need to know what are the precautions that I need to take and how do I match/track the LSN in case if I need to restore the logs after this log_backup statement in the future.
Another thing is, would it be fine if I simply add all the log restore files into the restore window in SSMS at the same time to do the log restore.
Would it pickup the order of the LSN automatically?
Thanks in advance
Regards
AP
May 7, 2009 at 11:54 am
The first and last LSNs of a backup set are stored in backupset table in msdb, so you probably don't need to track them yourself.
While it's possible to restore to a specific LSN, it's much more common to restore to a point in time using the STOPAT argument of the RESTORE LOG statement.
Greg
May 7, 2009 at 12:38 pm
SQL will let you know if you're out of order. Typically you're restoring by times anyway.
Be sure that you always restore with NORECOVERY. You can always bring it online later, but that way if you use the wrong file, or need to do another file you can do it.
May 7, 2009 at 11:34 pm
Thanks for the reply guys!!
From this I understand that I need to restore sequentially add fthe backup files in the query as the table in msdb or by the backup time.
I just need to know, if I am restoring multiple files through GUI whether it is a good idea to add all the files sequentially considering that there are hundreds of them.
I am wondering if I can create a batch file to pickup the files automatically from the given path?
Any ideas?
May 8, 2009 at 11:37 am
Hundreds of log backups for a single full backup? Maybe you should consider scheduling some differential backups between the fulls. That can drastically cut down on the number of log backups you have to deal with for a point in time restore.
As for restoring using the GUI, I've found that all the backups are listed in order when I open the Restore Database dialog and I just have to check the ones I want to restore. However, you can make a T-SQL script for restores with RESTORE LOG statements for each backup set you need.
Greg
May 8, 2009 at 11:44 am
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply