Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Can't restore transaction logs Expand / Collapse
Author
Message
Posted Monday, November 12, 2012 1:58 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, November 25, 2014 12:38 AM
Points: 30, Visits: 213
Hi Everyone,

I cannot restore the transaction logs after restoring the full backup.
It shows the transaction log is too early to apply. I have the following scheduled jobs to take backup files.

10:30 PM - Full Backup
11:00 PM - Transaction log
12:00 AM - Transaction log

Can't restore the 11:00 PM transaction log.

The database has mirrored database also.

Hope to hear from you SQL pro.

Thanks in advance.
Post #1383553
Posted Monday, November 12, 2012 2:15 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Monday, December 8, 2014 1:45 AM
Points: 5,221, Visits: 5,120
Sounds like the full backups last LSN is after the 11pm transaction log backup.

Check msdb.dbo.backupset correlating the first & last LSN columns to get the restore order.

But in this case it will be 10:30 Full, 12:00 TXLog




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1383556
Posted Monday, November 12, 2012 6:04 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 1:14 PM
Points: 40,615, Visits: 37,081
What time did the full backup complete? What's the message you get when you try to restore?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1383646
Posted Monday, November 12, 2012 9:22 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, November 25, 2014 12:38 AM
Points: 30, Visits: 213
The full backup completed at 11:00 PM

Error:
System.Data.SqlClient.SqlError: The log in this backup set begins at LSN #, which is too recent to apply to the database. An earlier log backup that includes LSN # can be restored.

Thanks.
Post #1383937
Posted Tuesday, November 13, 2012 5:42 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 1:14 PM
Points: 40,615, Visits: 37,081
marygrace_laurente23 (11/12/2012)
The full backup completed at 11:00 PM

Error:
System.Data.SqlClient.SqlError: The log in this backup set begins at LSN #, which is too recent to apply to the database. An earlier log backup that includes LSN # can be restored.


Ah, in that case there's an earlier log backup that needs to be applied first. Perhaps one that ran at 10:30?



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1384043
Posted Tuesday, November 13, 2012 7:19 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, November 25, 2014 12:38 AM
Points: 30, Visits: 213
We don't have 10:30 PM transaction log.

What we is hourly transaction log backup.

10:00 PM - Transaction Log
10:30 PM - Full Backup (every day)
11:00 PM - Transaction Log
12:00 AM - Transaction Log onwards



Post #1384367
Posted Wednesday, November 14, 2012 12:01 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 1:14 PM
Points: 40,615, Visits: 37,081
Then you need to restore the 10PM transaction log.

As the error said "The log in this backup set begins at LSN #, which is too recent to apply to the database. An earlier log backup that includes LSN # can be restored. "



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1384411
Posted Wednesday, November 14, 2012 6:34 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, November 25, 2014 12:38 AM
Points: 30, Visits: 213
Tried already to restore the 10 PM transaction log but showing same error.
Post #1384946
Posted Thursday, November 15, 2012 1:32 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Monday, December 8, 2014 1:45 AM
Points: 5,221, Visits: 5,120
Then you must be using an earlier full backup and not the current one from the latest 10:30 backup.

Check through the backupset table and correlate which log file it is wanting you to restore using the LSN columns and the LSN that the restore error message is giving you.




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1384999
Posted Thursday, November 15, 2012 3:42 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 1:14 PM
Points: 40,615, Visits: 37,081
anthony.green (11/15/2012)
Then you must be using an earlier full backup and not the current one from the latest 10:30 backup.


Yup.

A backup that starts at 10:30 and finishes at 11:30 may well need the tran log backup from 10:00 and the one from 11:00 (plus all later), but it could not need any from before that.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1385054
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse