locked
Order which mirroring database get up RRS feed

  • Question

  • Hi

    I have 3 server configured with mirroring. When the automatic failover occur, I use alter event generate by Sql Agent to rebuild user account (problem witch
    orphan user). My application use multiple database and I set up mirroring to multiple database. A question is the order which database get up after automatic failover. When event occur all database are ready to use, or maybe one database get up and sql agent send me event , secound database get up and sql agent send me event. What is the order?

    Wednesday, February 7, 2007 2:12 PM

All replies

  • There isn't any specific order.  The first one to detect a failure will be the first one to failover and should theorectically be the first one online.  Use the WMI events to trigger the alerts on state changes in Database Mirroring and then code your procedure that fixes the orphaned users to interrogate the sys.database_mirroring view to gather the precise state information which will tell you when a particular database promotes itself to principal.
    Thursday, February 8, 2007 7:49 AM
  • As the order of preference goes by Alphabetical order, I think it is applied on the Database mirroring failover tasks too. I can see similar action on the basis of Clustering in previous versions.

     I believe SQLerror log is best place to look into further information.

    Friday, February 9, 2007 2:27 PM
  • No, it isn't.  A Database Mirroring session is not going to failover until it detects a failure (requires you to be configured in High Availability/Synchronous with Automatic Failover).  Once it detects a failure, it is going to failover as quickly as it possibly can.  That detection time is bound by the health check intervals and has absolutely nothing at all to do with the name of a database, id of a database, or anything else.  Each health check is an independently process and it kicks off 5 seconds after the last health check succeeded.  If you are seeing anything else, it is a pure conincidence.  I have thousands of Database Mirroring sessions in production and I have never run across anything that correlates any kind of order other than the one which detects the failure first.
    • Proposed as answer by XtendedLearner Wednesday, April 6, 2016 12:47 PM
    Friday, February 9, 2007 2:48 PM