Mirroring problem

  • Thanks for the continued help.

    The principal and mirror databases are both in data centres connected together over a VPN over a 100mb Internet connection (tier 1).

    The sites Are about 5 miles Part.

    I understand that if the principal loses connection with the mirror and witness the database will be taken out of service.

    What I don understand is why the principal database goes out of service when the mirror db goes offline (I am still connected to the witness).

    It maybe that our applications are not handling the brief disconnect when the mirror comes back online and they are resyncing? Because from what I have read, the principal shouldnt go offline when we only lose the mirror.

    Will the principal db freeze connections for a short while when the mirror comes back online? While it's synchronising?

  • the mirroring scenario you are using requires a 2 phase commit process. A transaction occurs on the principal and is then written to the mirror. The transaction does not commit on the principal until the mirror confirms a commit, this could be the freezing you are seeing.

    Do you require automatic failover, more importantly are your applications failover aware?

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

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

  • I understand the 2 phase commit, and usually this is fine when the connections are up, however if the mirror is down then I believe the principal will just build up the transactions until the mirror comes back. As it still can see the witness, it has quorum. So from my understanding the principal database should still serve connections?

    As for Failover, this works well and our apps handle this without issue.

    We have lost the primary site and the witness has successfully enabled the mirror as the principal and the apps at the mirror site have started successfully.

    What I don't understand is why the apps at the principal site lose connection to the principal database when a problem occurs at the mirror site? I don't know if tHe apps disconnect when the mirror server fails, or when it resumes mirroring after the connection resumes!

  • rdavies 35008 (9/21/2011)


    If the mirror is down then I believe the principal will just build up the transactions until the mirror comes back.

    That is correct.

    rdavies 35008 (9/21/2011)


    What I don't understand is why the apps at the principal site lose connection to the principal database when a problem occurs at the mirror site? I don't know if tHe apps disconnect when the mirror server fails, or when it resumes mirroring after the connection resumes!

    it sounds like there is some latency for the disconnect when the mirror is lost, how long does it usually take for the principal to recognise the disconnection (the state will change in SSMS database treeview)

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

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

  • Yeah latency sounds like a possible culprit!

    It looks like our apps are not handling the database freeze very well when it's in limbo.

    Do you think the principal freezes when it disconnects/reconnects from the mirror?

  • rdavies 35008 (9/21/2011)


    Do you think the principal freezes when it disconnects/reconnects from the mirror?

    Hard to say as i have not seen the system. When the mirror reconnects the databases will start to synchronise and this can cause performance issues itself but i think the latency you're seeing is the disconnect.

    In other words, the period in between when the principal knows the mirror is up and is merrily sending transactions, not getting a reply and the session then being marked as disconnected on the principal.

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

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

Viewing 6 posts - 16 through 21 (of 21 total)

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