Tuesday, March 20, 2012

Reinitialize replication - Merge

I have a few databases that I replicate between NY and Greece. We utilize merge replication on all SQL 2000 servers. My question, is there a quick way to reinitialize replication besides pushing the initial snapshot? I would like to avoid the initial snapshot in the event of a failure due to the amount of time it takes to transfer over our 3mb ATM circuit.

Any help is greatly appreciated.

Thanks,
MichaelYou are kind of between a rock and a hard place (as you've probably noticed). The problem is that if you don't know what is "out of whack" in the replica, the only way to get it back in sync is to push a new snapshot. If you know what the problem is, replication prevents you from fixing it!

In the case where you don't know what is broken, the snapshot is your only safe answer. It may be ugly, but it saves everything that can be salvaged.

In the case where you know what needs to be fixed, you can drop the subscription, fix the problems, then resubscribe without pushing a new snapshot.

See the notes on this subject in MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/replsql/replimpl_7xbn.asp).

-PatP|||Usally you call ReinitializeSubscription when you want to recreate all the
tables on the subscriber and start from a "clean" state. Note that calling ReinitializeSubscription would not clean your subscribtion. This will happen on on the next sync.

Refer to books online for further information on merge replication topic.

No comments:

Post a Comment