locked
Different table counts in mirroring enviroment why ? RRS feed

  • Question

  • Hi Friends,

    We have Principal-Mirrored configurations in sql server 2012 STD edition. and it was showing (Principal,Synchronised) i.e. working fine. But one day principal server permanently shutdown/not available. Then we recover all DB's from Mirrored copy by below command

    restore database DFD  with recovery 

    But after that we checked the records count it was not matching for some of the tables . (compared with one day previous backup copy of formal principal DB) . 

    Why this mismatch in mirroring configurations.

    Wednesday, July 18, 2018 12:23 PM

Answers

  • There may have been transactions after the formal principal DB was backed up  (the backup you're now using to compare) and before it went down. So mirror DB is now showing the records that do not exist in the backup copy of former principal.


    Please remember to click "Mark as Answer" if my response answered your question or click "Vote as helpful" if it helped you in any way.


    • Edited by Mohsin_A_Khan Wednesday, July 18, 2018 1:16 PM
    • Marked as answer by DS150585 Thursday, July 19, 2018 7:28 AM
    Wednesday, July 18, 2018 1:13 PM
  • How did the primary was shutdown abruptly or after pausing the mirroring. If primary was down how did you matched the records, how are you so sure that record is missing. It may be possible that when you run the transaction it completed on primary but and acknowledgement was not sent to mirror as it suddenly went down when it was in process of sending. or it sent to mirror but mirror was not able to send it back to principal and hence when recovering it considered it as uncommitted transaction and rolled it back

    Cheers,

    Shashank

    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    My TechNet Wiki Articles

    MVP

    • Marked as answer by DS150585 Thursday, July 19, 2018 7:28 AM
    Wednesday, July 18, 2018 1:17 PM

All replies

  • There may have been transactions after the formal principal DB was backed up  (the backup you're now using to compare) and before it went down. So mirror DB is now showing the records that do not exist in the backup copy of former principal.


    Please remember to click "Mark as Answer" if my response answered your question or click "Vote as helpful" if it helped you in any way.


    • Edited by Mohsin_A_Khan Wednesday, July 18, 2018 1:16 PM
    • Marked as answer by DS150585 Thursday, July 19, 2018 7:28 AM
    Wednesday, July 18, 2018 1:13 PM
  • How did the primary was shutdown abruptly or after pausing the mirroring. If primary was down how did you matched the records, how are you so sure that record is missing. It may be possible that when you run the transaction it completed on primary but and acknowledgement was not sent to mirror as it suddenly went down when it was in process of sending. or it sent to mirror but mirror was not able to send it back to principal and hence when recovering it considered it as uncommitted transaction and rolled it back

    Cheers,

    Shashank

    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    My TechNet Wiki Articles

    MVP

    • Marked as answer by DS150585 Thursday, July 19, 2018 7:28 AM
    Wednesday, July 18, 2018 1:17 PM