locked
Mirroring and database corruption RRS feed

  • Question

  • Hello,

    I am thinking of implementing database mirroring.

    One question I have is that if there is a corruption in the primary, won't those corrupted bits go and corrupt the mirror db as well?

    How will the SQL Server know, and prevent such a scenario?

    Tuesday, August 24, 2010 1:31 PM

Answers

All replies

  • Hello MSDN Student,

    I do not think you posted your question to the right forum. But nevertheless, your question is too broad, I guess there could be multiple scenarios, in all cases, keep your database backed up as much as possible, by the way in one instance I remember the mirroring fell on the primary and the corruption was to blame. At that time the whole process has stopped, but the mirror (target db) was not affected.

    One note: you need to make sure if you do proceed with mirroring your network infrastructure is reliable.

    Another thing, MS SQL Server sometimes is able to recover from some corruptions, please see this article: http://msdn.microsoft.com/en-us/library/bb677167.aspx


    Arthur
    Tuesday, August 24, 2010 2:16 PM
  • In SQL Server 2008, Database mirroring has the ability to restore a corrupt page from the mirror database, to the principal database.

    The following article describe it clearly: http://sqlskills.com/BLOGS/PAUL/post/SQL-Server-2008-Automatic-Page-Repair-with-Database-Mirroring.aspx


    SKG: Please Marked as Answered, if it resolves your issue.
    Wednesday, August 25, 2010 2:33 PM
  • Hi MSDN student,

    It depends on what kind of corruption your database suffers from , moreover this is ENTERPRISE edition feature which you know is really costly.


    Thanks, Leks
    Thursday, August 26, 2010 7:13 AM
    Answerer
  • The database mirroring in SQL 2008 provides automatic recovery from certain types of data corruption which is exclusive to Enterprise edition only.When a corrupted page is detected, the principal and mirror databases will request fresh copies of the page from each other and overwrite the corrupted page with a good copy.

    Thanks, xs

    Wednesday, September 1, 2010 5:26 AM