January 22, 2004 at 12:37 pm
I have a maintenance plan that does a complete backup of up a database at 2:00AM, and backups of the transaction log every 30 minutes from 7:00 AM to 6:00 PM. I can restore the complete backup, but when I attempt to restore the first log file, I get an error indicating this is not the correct log file - that I need an earlier one. In comparing this database to other databases whose backups are working, I discovered that this database had torn page detection turned on. When I turn this option off, the restores work correctly. Can anyone shed light on this?
Thanks
Tom
January 22, 2004 at 12:57 pm
From BOL.
"If a torn page is detected, an I/O error is raised and the connection is killed. If the torn page is detected during recovery, the database is also marked suspect. The database backup should be restored, and any transaction log backups applied, because it is physically inconsistent. "
I tested it with 'torn page' enabled, The log restoration works fine.
Can you post the error messages?
January 22, 2004 at 1:55 pm
The error is: Microsoft SQL-DMO(ODBC SQLState 42000) The log in this backupset begins at LSN692000000131700001, which is too late to apply to this database. An earlier backup log that includes LSN69200000013090001 can be restored. RESTORE LOG is terminating abnormally.
SQL Server 2000 SP3A
January 22, 2004 at 1:59 pm
Try to restore full database and recovery it to see whether database was in 'simple' recovery mode when you backed it up.
If the database was backed up in 'full' recovery mode, make sure restore the first log backup after the full database is restored with 'norecovery' option.
January 22, 2004 at 3:36 pm
I verified that the database was in 'full' recovery model. When I was comparing all of the properties on this DB with one that was working, the only difference I found was the torn page detection setting. I turned it off, did a complete backup followed by logs - the restore worked. I verified that the log being restored was the first log following the full backup. That is why I am puzzled.
Thanks
January 23, 2004 at 9:36 am
See Q295371: PRB: Filegroup Log Restore May Fail with Error Message 4305
Error Messages
SQL Server 2000
Server: Msg 4305, Level 16, State 1, Line 2
The log in this backup set begins at LSN 6000000007200001, which is too late to apply to the database. An earlier log backup that includes LSN 6000000005000001 can be restored.
Server: Msg 3013, Level 16, State 1, Line 2
RESTORE LOG is terminating abnormally.
The error message may occur if:
At least one log backup is performed before the filegroup backup is performed.
There are open transactions when the preceding log backup is performed.
You are only restoring log backups that were performed after the filegroup backup without restoring the log backup mentioned in the first item in this list.
RandyHelpdesk: Perhaps Im not the only one that does not know what you are doing. 😉
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply