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.
- 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.
- Restore the full backup with no recovery mode.
- Then Restore the log backup with no recovery mode.
- 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.
Thanks for the post
ReplyDeleteAwesome. Thank you
ReplyDeleteThis did not work for me. I've restored from Full backup first and then restored from t-log the results being the error. I have created a principle backup several times and restored to the mirror with the same error each time.
ReplyDelete