HiveBrain v1.2.0
Get Started
← Back to all entries
patternModerate

Breaking and Restoring a mirror

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
andmirrorrestoringbreaking

Problem

I have to do some maintenance on a secondary node of a mirror. Since this is the result of the site becoming slow while the mirror re-established after a brief network outage I want to be safe and disable the mirror, then re-enable it after I'm done poking at the offending server.

The plan I have right now is to:

  • Disable the mirror



  • Do my potentially dangerous troubleshooting



  • Restore all missed transaction logs



  • Re-establish the mirror



Is this the safest way to go about breaking/re-establishing a mirror? Are there any gotcha's I should look out for?

Solution

It sounds as if you simply want to pause and resume your mirror. Have you seen this link yet? http://msdn.microsoft.com/en-us/library/ms190664.aspx

The gotcha with this would be the length of time you expect to have the mirror paused. If you take too long then the principal server could experience a large amount of transaction log growth. if you do not expect to be paused for a long period of time, then you should be fine.

If you feel that you must break the mirror and resume later, then you should do the following:

Break the mirror using this against the principal:
ALTER DATABASE SET PARTNER OFF

If you are concerned that your maintenance will take a long time, then you should perform regular transaction log backups, so as to make certain the log does not grow out of control and fill up your disks. however, the more trx log backups you have, the more you need to recover to the mirror later.

After you have restored the trx logs, you should be able to get mirroring running again.

Another option would be to reinitialize everything, but I don't know how big of a database this is, it may be too much for you to restore, so trx logs may be the better option.

This link explains it best: http://msdn.microsoft.com/en-us/library/ms189112.aspx

And this link covers more topics: http://msdn.microsoft.com/en-us/library/ms175059.aspx

HTH

Context

StackExchange Database Administrators Q#1820, answer score: 12

Revisions (0)

No revisions yet.