Database Mirroring

  • Comments posted to this topic are about the item Database Mirroring

    Best,
    Naseer Ahmad
    SQL Server DBA

  • Correction, Principal do not wait for commit transaction on the mirror. It waits for transaction being recorded in transaction log file on the mirror server. This is common misconception.

  • Thanks for the question - easy point today

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • Stuart Davies (3/27/2013)


    Thanks for the question - easy point today

    +1 Yup.... nice when I don't have to think.... rare... but nice 🙂



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • Nice question; I got it wrong - expected to choose between two (asynchronous and synchronous plus maybe some red herrings) when I read the question but then saw the three options and had to guess whether syncronous was called "high availability" or "high safety" and chose the wrong one.

    Evgeny Garaev (3/26/2013)


    Correction, Principal do not wait for commit transaction on the mirror. It waits for transaction being recorded in transaction log file on the mirror server. This is common misconception.

    BOL disagrees with you:

    BOL


    A database mirroring session runs with either synchronous or asynchronous operation. Under asynchronous operation, the transactions commit without waiting for the mirror server to write the log to disk, which maximizes performance. Under synchronous operation, a transaction is committed on both partners, but at the cost of increased transaction latency.

    and high safety mode uses synchronous operation.

    Of course BOL is sometimes wrong, and I don't know whether it is right here or the author of this BOL page suffered from a "common misconception".

    Tom

  • Evgeny Garaev (3/26/2013)


    Correction, Principal do not wait for commit transaction on the mirror. It waits for transaction being recorded in transaction log file on the mirror server. This is common misconception.

    That's what I got out of the documentation too, but I'm not very familiar with mirroring setups.

  • Finally a question I knew the answer to and didn't have to look up. Thanks

  • mtassin (3/27/2013)


    Stuart Davies (3/27/2013)


    Thanks for the question - easy point today

    +1 Yup.... nice when I don't have to think.... rare... but nice 🙂

    +1

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Easy one, thanks!

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • L' Eomot Inversé (3/27/2013)


    Evgeny Garaev (3/26/2013)


    Correction, Principal do not wait for commit transaction on the mirror. It waits for transaction being recorded in transaction log file on the mirror server. This is common misconception.

    BOL disagrees with you:

    BOL


    A database mirroring session runs with either synchronous or asynchronous operation. Under asynchronous operation, the transactions commit without waiting for the mirror server to write the log to disk, which maximizes performance. Under synchronous operation, a transaction is committed on both partners, but at the cost of increased transaction latency.

    and high safety mode uses synchronous operation.

    Of course BOL is sometimes wrong, and I don't know whether it is right here or the author of this BOL page suffered from a "common misconception".

    I think there's no difference.

    When SQL Server is ready to commit a transaction, it waits for the transaction log to write the final changes to disk and then reports success of the commit. So for the purpose of the context of this question, "wait until the mirror commits" or "wait until the mirror write the transaction log" are identical.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • This is the easiest question of the month for me. Thanks. 😎

    --------------------------------------------------------------------------------------
    Hai Ton
    My Db4Breakfast blog.

  • I would agree with Hugo. If the transaction is written to the log on the mirror, it is committed. If the mirror were to fail, this would be rolled forward in recovery.

  • L' Eomot Inversé (3/27/2013)


    Nice question; I got it wrong - expected to choose between two (asynchronous and synchronous plus maybe some red herrings) when I read the question but then saw the three options and had to guess whether syncronous was called "high availability" or "high safety" and chose the wrong one.

    Like Tom I choose wrong and selected high availability. Thanks for the question, and putting the focus on this.

    M.

    Not all gray hairs are Dinosaurs!

  • Hugo Kornelis (3/27/2013)


    L' Eomot Inversé (3/27/2013)


    Evgeny Garaev (3/26/2013)


    Correction, Principal do not wait for commit transaction on the mirror. It waits for transaction being recorded in transaction log file on the mirror server. This is common misconception.

    BOL disagrees with you:

    BOL


    A database mirroring session runs with either synchronous or asynchronous operation. Under asynchronous operation, the transactions commit without waiting for the mirror server to write the log to disk, which maximizes performance. Under synchronous operation, a transaction is committed on both partners, but at the cost of increased transaction latency.

    and high safety mode uses synchronous operation.

    Of course BOL is sometimes wrong, and I don't know whether it is right here or the author of this BOL page suffered from a "common misconception".

    I think there's no difference.

    When SQL Server is ready to commit a transaction, it waits for the transaction log to write the final changes to disk and then reports success of the commit. So for the purpose of the context of this question, "wait until the mirror commits" or "wait until the mirror write the transaction log" are identical.

    I must admit that my first reaction to Evgeny's comment was "Huh! Whats the difference?"; but there could be wrinkles in SQL Server in this area that I don't fully understand, so I commented on his comment on the basis that maybe there was some difference. I'm rather relieved to see that you (and Steve) think that there is not, so I don't have some hard unlearning to do after all.

    Tom

  • Just a small point to watch, Naseer, if you don't mind - PRINCIPLE is actually a noun, and not the correct word in this connection. The word you wanted is PRINCIPAL, an adjective meaning main or chief. Thus, the Principal Server, is the main server in this context.

    All the best

    Ken

    You never know: reading my book: "All about your computer" might just tell you something you never knew!
    lulu.com/kaspencer

Viewing 15 posts - 1 through 15 (of 19 total)

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