![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am using the full recovery model and I make transaction log backups every 15 minutes. Now I need to restore the database because of user update error. When I run the command: use master RESTORE HEADERONLY FROM LgBackupLog It shows 14 transaction logs that have been backed up. The columns BackupStartDate and BackupFinishDate have a Date/Time. I assume that I use the BackupFinishDate column to restore the database for Point-in-Time recovery, my question is: 1-Out of the 14 transaction logs which is the first one to restore and which is the last one to restore? |
|
2-Do I only include the StopAt clause on the last transaction log that I apply? |
#3
| |||
| |||
|
|
A quick look in Books Online tells me that you should be able to specify it on all RESTORE commands. |
|
JB (JB (AT) discussions (DOT) microsoft.com) writes: I am using the full recovery model and I make transaction log backups every 15 minutes. Now I need to restore the database because of user update error. When I run the command: use master RESTORE HEADERONLY FROM LgBackupLog It shows 14 transaction logs that have been backed up. The columns BackupStartDate and BackupFinishDate have a Date/Time. I assume that I use the BackupFinishDate column to restore the database for Point-in-Time recovery, my question is: 1-Out of the 14 transaction logs which is the first one to restore and which is the last one to restore? The first is the oldest. Well, if it's older than the full backup, you don't need it, but SQL Server should tell you. The last log is the one that has a FinnishDate after the mistake. 2-Do I only include the StopAt clause on the last transaction log that I apply? A quick look in Books Online tells me that you should be able to specify it on all RESTORE commands. "If the specified STOPAT time is after the last LOG backup, the database is left in the unrecovered state, just as if RESTORE LOG ran with NORECOVERY." A Google search on "Restoring a Database to a Point Within a Backup" maybe helpful for you. -- Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx |
![]() |
| Thread Tools | |
| Display Modes | |
| |