Asynchronous mirroring

  • Hi Guys,

    We had an asynchronous mirror set up. When the link between the primary and mirror went down the mirror obviously broke. I have two questions.

    1. Can I schedule a job to restart a mirror when it breaks.

    2. Since asynchronous mirroring commits on the primary before sending the transaction to the mirror, why could I not shrink the log file of the primary database before removing the mirror?

  • 2) Because the log records still have to be sent to the secondary. If they could be removed from the log before being sent to the secondary, then you'd have to reinit the mirror from scratch every time the network drops.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Hi Gila,

    Thanks for your feedback. I just wanted to confirm. Any Ideas about restarting a mirror automatically? I have a very highly transactional DB and if the mirror goes down for a short amount of time it will go out of sync and I wont be able to restart the mirror, I will have to reconfigure it from the start.

  • Not offhand, no. You'll probably need a job that runs every (x) minutes, checks the state and then takes any necessary action. Won't be much overhead if it does nothing most of the time.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks again. Will research to find some options.

  • Might be worth a shot to try triggering off of one of these: Alerting on Database Mirroring Events

    ...maybe one Session State changes?

  • Thanks for the tips, I will do some research on these.

Viewing 7 posts - 1 through 6 (of 6 total)

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