locked
Undo phase while failover to mirror RRS feed

  • Question

  • Hi,

    can somebody please help me to clear the Recovery process of mirroed database when a failover happends.

    Database mirroring transfers only the commited transaction from principal to mirror. So during the failover process the new principal database (old mirror) will go for recovery which involves replaying the transactions in the transactions log of new principal db (which is basically processing the REDO QUEUE) and bring the new principal db online.

    I am not really understanding where the UNDO coming into pitcure in database mirroring failover. There is no chance of an uncommited transaction going from principal to mirror and so all it needs to do is redo while failover. the below article is bit confusing as it illustrate the UNDO

    http://msdn.microsoft.com/en-us/library/ms187465(v=sql.110).aspx

    Saturday, January 15, 2011 12:11 PM

Answers

  • Hi,

    A transaction can generate more than one transaction logs, starting with BEGIN TRANSACTION, ending with COMMIT TRANSACTION or ROLLBACK TRANSACTION and other middle data midification logs. If either COMMIT TRANSACTION or ROLLBACK TRANSACTION transaction log is not mirrored to the mirror server, such transaction will be treated as uncomitted and rolled back during the UNDO phase.

    Hope this helps. If you have more query, please feel free to let me know.


    Best Regards,
    Chunsong Feng

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Proposed as answer by LekssEditor Saturday, January 22, 2011 7:51 PM
    • Marked as answer by WeiLin Qiao Tuesday, January 25, 2011 11:56 AM
    Friday, January 21, 2011 11:26 AM

All replies

  •  There is also the undo process for transactions on the mirror (which was the principal before failure) that may not have been commited. SQL Server sends page hints to the principal early in the undo process, so that the principal can cache the pages into the send queue for the mirror.

    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Sunday, January 16, 2011 8:32 AM
  • Hi,

    A transaction can generate more than one transaction logs, starting with BEGIN TRANSACTION, ending with COMMIT TRANSACTION or ROLLBACK TRANSACTION and other middle data midification logs. If either COMMIT TRANSACTION or ROLLBACK TRANSACTION transaction log is not mirrored to the mirror server, such transaction will be treated as uncomitted and rolled back during the UNDO phase.

    Hope this helps. If you have more query, please feel free to let me know.


    Best Regards,
    Chunsong Feng

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Proposed as answer by LekssEditor Saturday, January 22, 2011 7:51 PM
    • Marked as answer by WeiLin Qiao Tuesday, January 25, 2011 11:56 AM
    Friday, January 21, 2011 11:26 AM