SQL Server Mirroring

  • Planning on setting up mirroring for a SQL 2008 standard production server and I realize I need to restore the DB on the mirror server with NORECOVERY and then apply all transaction logs. The question I have is should I be taking the production server offline while restoring logs on the mirror server or can the production server be running. In other words do the principal and mirror server need to be at the same LSN point before mirroring can be setup or will the mirror server catch up if the production server had more transaction commits when mirroring is setup?

  • garfield81 (7/13/2011)


    Planning on setting up mirroring for a SQL 2008 standard production server and I realize I need to restore the DB on the mirror server with NORECOVERY and then apply all transaction logs. The question I have is should I be taking the production server offline while restoring logs on the mirror server or can the production server be running. In other words do the principal and mirror server need to be at the same LSN point before mirroring can be setup or will the mirror server catch up if the production server had more transaction commits when mirroring is setup?

    you need to restore one full backup then a log backup then initiate mirroring, job done!

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

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • No - you do not need to take down the production system. But, you might need to stop the transaction log backups if you run them often enough that you cannot copy the latest over to the other server fast enough.

    To enable mirroring - the mirror instance has to have the transaction logs restored up to the latest transaction log backup taken on the principal. If another one occurs while you are still restoring - when you try to enable mirroring it will fail.

    In most cases, all I have had to do was copy all of the files across and start restoring. While the restores are occuring, I monitor for new transaction log backups and copy them across as soon as possible. Once the initial restores are done, I then restore any additional that have occured and enable mirroring.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Thank you for your replies. The trasaction logs are 6 hours apart so as long as i restore thelast trans log the mirror server does catch up to the principal server.

    Thanks again

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply