Question

I have a database using SQL 2005 merge replication and ther has been data inserted into the subscriber that never went over to the publisher. I believe there was a conlict that happened over the 14 day retention period ago and I do not see it any more. Can I manually add them into the publisher? Any ideas or directing me to a good link is appreciated. Thank you.

Was it helpful?

Solution 2

Before I answer this please note that the following directions can be very dangerous and must be done with the utmost care. This solution works for me because the tables in question are only written to one(1) subscriber and no where else. Basically what I did was to:

  1. Pause replication(I actually disabled the replication job for the subscriber I was working on and enabled it when done)
  2. Set the Identity Insert for the table to ON(auto identity is used on the table)
  3. Alter the table to NOCHECK CONSTRAINT the repl_identity_range_(some Hex Value here)
  4. Disabled the MSmerge_ins_(some Hex Value here) trigger for the table.(MAKE SURE TO ENABLE THIS WHEN COMPLETE)!!!
  5. Inserted the rows
  6. Set Indentity_Insert off
  7. Enabled the MSmerge_ins_(some Hex Value here) trigger
  8. Alter the table to CHECK CONSTRAINT the repl_identity_range_(some Hex Value here)

You can find the name of the repl_identity_range constraint by running sp_help. I reccomend that you use a tool such as Red Gates data compare to validate once you are complete just to make sure. Depending on you situation you may have to manually insert the data at all the subscribers as well. FYI-I had to do this on a production database without interruption the end users. Please use caution.

OTHER TIPS

If the conflict occurred before the current retention period, I don't think there is any magic that will get it back. Can you drop the subscription and re-create it (synchronizing the deltas manually in the meantime)? Probably the safest action.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top