The log in this backup set begins at LSN (xxx), which is too recent to apply to the database. An earlier log backup that includes LSN (xxx)

 

ERROR MESAGGE:

“The log in this backup set begins at LSN (xxx), which is too recent to apply to the database. An earlier log backup that includes LSN (xxx) can be restored.”

EXPLANATION:

You receive this error when trying to restore a Transaction Log backup.

When you restore database backups, the sorting should be as follows:
– First, Full Backup of the database is restored.
– Then Differential Backup is restored.
– Lastly, Transaction Log Backup backups are restored.

Let’s say you have a full backup of the file name “MyDatabase.BAK”.

After that, you have taken a backup of Transaction Log two times, “TransactionLogBackup1.trn” and “TransactionLogBackup2.trn”

You must first restore the full backup with the WITH NORECOVERY commands.

For Example:

Then, respectively, transaction log backups are restored. According to our scenario, the transaction log backup that needs to be restored after the “MyDatabase.BAK” file is “TransactionLogBackup1.trn”.

if you try to restore the file “TransactionLogBackup2.trn” before the “TransactionLogBackup1.trn” file, you will see this error.

SOLUTION:

You must restore Transaction Log Backups in the correct order.

Ekrem Önsoy
Author: Ekrem Önsoy

The original article was written in Turkish by Ekrem Önsoy and translated to English by dbtut with the consent of the author. The copyright of the article belongs to the author. The author shall not be liable in any way for any defect caused by translation.

Leave a Reply

Your email address will not be published. Required fields are marked *