none
The remote copy of database has not been rolled forward to a point in time that is encompassed in the local copy of the database log.

    Question

  • I am able to setup the partner on the mirror with no problems.  I receive the error message when I try to setup the partner on the principal.  I have restored the log file with no recovery, and even created additional log files and restored them and still receive the same error. 

    TITLE: Database Properties
    ------------------------------

    An error occurred while starting mirroring.

    ------------------------------
    ADDITIONAL INFORMATION:

    Alter failed for Database 'printorders'.  (Microsoft.SqlServer.Smo)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.5000.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Alter+Database&LinkId=20476

    ------------------------------

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

    ------------------------------

    The remote copy of database "printorders" 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)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.4053&EvtSrc=MSSQLServer&EvtID=1412&LinkId=20476

    ------------------------------
    BUTTONS:

    OK
    ------------------------------
    Monday, April 04, 2011 8:01 PM

Answers

  • Make sure that the mirror server has caught up close enough in time to the principal. If you see the following message when you attempt to start mirroring,

    The remote copy of database 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) that indicates the mirror is not caught up. You need to apply transaction log backups from the principal to the mirror (with NORECOVERY) in order to catch the mirror up to a point where it can start receiving log records from the principal.

    here is some more help to troubleshoot mirroring http://technet.microsoft.com/en-us/library/cc917680.aspx

    • Marked as answer by OneManITShow Tuesday, April 05, 2011 4:31 PM
    Tuesday, April 05, 2011 10:37 AM

All replies

  • My assumption is that you have a regular LOG backup job running and that it already generated a new LOG backup after the one you restored on the mirror. For example,
     
    1) 12:00 AM - FULL backup generated on principal
    2) 12:30 AM - LOG backup generated on principal
    3) 01:00 AM - FULL backup generated in #1 restored on mirror
    4) 01:10 AM - regular LOG backup job kicked in on principal
    5) 01:30 AM - LOG backup generated in #3 restored on mirror
    6) 01:40AM - ran ALTER DATABASE SET PARTNER on mirror
     
    Running the ALTER DATABASE SET PARTNER on the principal will fail as you still need to restore the LOG backup generated in #4 on the mirror database
     

    Edwin Sarmiento SQL Server MVP
    Blog | Twitter | LinkedIn
    Monday, April 04, 2011 8:46 PM
  • Make sure that the mirror server has caught up close enough in time to the principal. If you see the following message when you attempt to start mirroring,

    The remote copy of database 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) that indicates the mirror is not caught up. You need to apply transaction log backups from the principal to the mirror (with NORECOVERY) in order to catch the mirror up to a point where it can start receiving log records from the principal.

    here is some more help to troubleshoot mirroring http://technet.microsoft.com/en-us/library/cc917680.aspx

    • Marked as answer by OneManITShow Tuesday, April 05, 2011 4:31 PM
    Tuesday, April 05, 2011 10:37 AM
  • Hai All,

    Thanks for the post, it only need updated full backup (both backup and log file) to be restored in no recovery mode.

    Thursday, May 23, 2013 5:48 AM