How to setup a merge replication when data are differents?

  • Hi,

    I need to setup a merge replicator between 2 SQL Server 2000, located in Florida and Montreal. Tables structures are the same, but the data are not. There is actually data being added on both sites. I need them to be mirror.

    I tried to setup the replication from the Florida server (Montreal being the suscriber) and push the suscription. It created a snapshot and applied it to the Montreal's server. Problem is, it deleted all the data in Montreal and applied the data from Florida. Fortunatly, I had a backup and I could restored it, so no loss of data in Montreal.

    so, does the databases have to be identical (data related) when setting up a merge replicator? Otherwise, how can I setup the replication without loosing any data on the suscriber's side?

    thanks a lot for your time and help

  • You will have to merge the data from one of the databases to the other and then use that merged database as the publisher.

    Otherwise, you will have to setup the subscription telling it that you don't want to initialize because it already has a copy of the data. This will prevent the data in the subscription from being overwritten, but that data will not be replicated other the other database until the record is updated.

    Joie Andrew
    "Since 1982"

  • thanks for the answer. Updating one of the database is very difficult because:

    - Most of the rows are similar

    - A lot of rows are in a database and not in the other

    - A lot more are updated in a database and not in the other

    So, what I did, I used Red Gates's SQL Data Compare and edited the script to remove any delete statement and ran the script. It works and most of the tables were mirrored that way. (I don't know how I could have done it without Data Compare!). Then, I setup the merge replication with snapshot. It applied sucessfully and the replication worked.

    Now, I have a problem with a particular table who have a identity column (set to not for replication, of course). I had to reseed the identity of one of the table, but it's a short term solution. So I wanted to change the column increment property, to odd identity in a table and even in the other. But I can't change properties while the replication is working. Is there a way I can change the properties while the replication is running? Because I don't want to have to drop the suscription and have to reapplied a snapshot again!

    thanks a lot for your time and help

Viewing 3 posts - 1 through 2 (of 2 total)

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