Restore job fails during the log shipping process and the ‘System.Data.SqlClient.SqlError: …. An earlier log backup that includes LSN can be restored.’ error is encountered

Applies to:
ApexSQL Backup

Symptoms:
During the process of Log shipping, the restore transaction log job fails and the ‘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.’ error is encountered, and whole process fails.

Cause:
During the course of log shipping process, a new full backup of source database has been created. From this point on, ApexSQL Backup does not search for new full or differential backups to re-initialize destination database, but searches only for transaction log backups.

Workaround:

There are two workarounds for this issue:

  1. Delete the scheduled log shipping job, and create new one – during this process, new backup is created, and ApexSQL Backup will again have clear ‘starting point’ for the log shipping process
  2. Manually perform restore process via SQL Server Management Studio

b. The database recovery state needs to be changed to the no-recovery (restoring) state manually from SQL Server Management Studio. To perform this, the user needs to execute following steps:

  1. Locate the destination database in SQL Server Management studio, Right click on the database, and navigate to TasksRestoreDatabase

  2. In the Select a page menu, select Options and in the Recovery state drop menu select Restore with norecovery

    C:\Users\FEAR\AppData\Local\Temp\SNAGHTML193a0f7.PNG

  3. Click OK to complete the process.

Affected versions:
ApexSQL Backup 2015.01.0011