0

I have two identically structured databases on two separate servers. Both have different data within them.

I have set one of them up with merge replication as a publisher and I want the other to be a subscriber.

The problem is that when I create the subscription, the publisher sends its snapshot to the subscriber and it clears all of the data from the subscriber database before it begins the sync process.

How can I preserve the data in both databases and set them up so that one is the publisher and the other is the subscriber?

1 Answer 1

1

You will need to manually merge the existing databases and initialize from that source.

One challenge you might face in manually merging the databases is conflicting primary keys. If so, this is typically handled by adding a location-specific identifier column and extending the primary key to include this column. This is known as partitioning your data.

3
  • Yes, the data is partitioned. I am transferring some large BLOBs I was just hoping there was some way other than the manual route. Thank you.
    – MrZander
    Jul 18, 2014 at 17:16
  • If the data is already partitioned then you could specify a value of none for the @pre_creation_cmd article property. In the Article Properties dialog this property is named Action if name is in use. By default it is set to drop. Jul 18, 2014 at 17:24
  • That is exactly what I was looking for, thank you!
    – MrZander
    Jul 18, 2014 at 17:41

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.