Printed 2017/08/23 08:19AM

Database Mirroring FAQ: If the principal fails while running in high performance mode, what options do I have for bringing the mirror online?

By Robert Davis, 2009/02/16

Question: If the principal fails while running in high performance mode, what options do I have for bringing the mirror online?

This question was sent to me via email. My reply follows.

Quick question on DB mirroring client redirection after Principal fails ...

Consider a simple scenario with Asynchronous mirroring:

  1. We are implementing asynchronous [high performance] mirroring without witness.
  2. The client application connects to the mirroring session using below connection string:

    Source={PrincipalServerName};Initial Catalog={DBName};Integrated Security=SSPI;Failover Partner= {MirrorServerName}
  3. Now due to some disaster, the Principal Server goes offline and will be offline for let’s say next 48 hours.
  4. We notice that client connections fail since primary is offline and a failover has not yet be done.
  5. What steps should be taken now to connect the client application to the mirrored database?

I can force the service or break the mirroring session (assuming with possible data loss) and re-setup later when Principal comes online.

  1. Is above statement correct?
  2. If yes, what changes do I need do in the connection strings for force service and breaking the mirror?
  3. Would connection string in step#2 works with failover partner parameter?

My answer:

  1. Yes, those are your only options for bringing the mirror online at this point. Forcing the service is preferable.
  2. If you force the service, no changes will need to be made to the connection strings because the clients will be able to connect to the failover partner.

    If you break mirroring, the Failover Partner parameter of the connection string will not be honored because the database is not currently participating in mirroring. You would have to alter the connection string to point at the mirror as the principal. One caveat to this is if you were already running on the original mirror as the current principal and the server you force service on is listed as the principal in the connection string already, no changes will need to be made.
  3. As described above. Always yes for forced service, usually no but sometimes yes for breaking the mirror.

Copyright © 2002-2017 Redgate. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.