Search This Blog

Loading...

Saturday, January 26, 2013

SQL2008R2 Error: The remote copy of database "XXXXX" has not been rolled forward to a point in time that is encompassed in the local copy of the database log. (Microsoft SQL Server, Error: 1412)


An error occurred while starting mirroring.
Alter failed for Database 'XXXXX'.  (Microsoft.SqlServer.Smo)
The remote copy of database "XXXXX" has not been rolled forward to a point in time that is encompassed in the local copy of the database log. (Microsoft SQL Server, Error: 1412)



Solution:
Log backup is not close enough to the mirror server database log. So restore is getting failing in the database mirroring session initiation.

  1. Take latest principal database full and log backup with NO RECOVERY mode and copy the backups to the mirror server to restore it by the below order.
  2. Restore the full backup with no recovery mode.
  3. Then Restore the log backup with no recovery mode.
  4. Then start your database mirroring session.

If you are trying to restore the log backup before full backup, you will get the below error.

So the order of backup in the restore is very important. Full backup first and then Log backup to restore.

1 comment: