5

Let's say we have a principal server, a mirroring server (the one that serves as the failover backup) and a witness server.

Does it matter if I were to bring the mirroring server (not the principal) offline for a short while (five minutes, let's say). Is this going to break the mirror? Is there anything I need to do (such as turning the mirroring off temporarily on the mirrored databases) before I take the server offline?

There are plenty of resources online to explain what needs to happen when the principal goes down, but nothing I can find about this scenario.

2 Answers 2

8

I'd do a set partner suspend, then take the mirror down.

Some additional links:

Mirror backup & restore

Mirror backup script

2
  • Sounds reasonable. Should I also disable trans log backup on the principal while the mirror is down? Aug 24, 2012 at 6:17
  • 1
    No you can continue to take your normal backups. But your tlog will not recover(reuse) space while the mirror is suspended. So if you are planning to have the mirror suspended for a while, this could = large tlog. When you resume the mirror, it will catch up. Suspend would be good for short term maintenance. If you know you need to be down for a while you may want to break the mirror. Aug 24, 2012 at 17:04
8

Theoretically you shouldn't do anything. Just take the mirror down, do the maintenance, then bring it back up. The whole purpose of the mirroring is to survive when something like that occurs accidentally, so it must survive it and recover fine when it occurs intentionally.

You can follow Eric's advise and set the partner suspend, but is not necessary. I wouldn't do it mostly because I'm more interested to see it if it does fail, and how it fails, but that is job conditionning on my side... So there is no harm in setting suspend.

You should continue to take log backups on the principal while the mirror is down. The principal knows the last LSN confirmed by the mirror before going down and will not truncate the log past that point.

4
  • Would it make any difference if the mirror was in async or sync mode? From my understanding the mirror cannot be offline in sync (High availability mode). Jul 31, 2015 at 8:47
  • 1
    @Zapnologica If the mirror could not go offline in sync mode then it would be called "High unavailability mode", as the mirror could bring the primary offline! The mirror can absolutely go offline, then the mirroring on the primary continues in "running exposed" mode: If the mirror server instance goes down, the principal server instance is unaffected and runs exposed (that is without mirroring the data). Jul 31, 2015 at 8:56
  • Thank you for that clarification, That is how I had hoped it would have worked. The way which HA was explained regarding the Prinicpal only commiting the transaction once the mirror had acked it, Jul 31, 2015 at 9:08
  • 1
    That part is true, but with the addendum that it only applies to the "synchronized" state. Jul 31, 2015 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.