Tuesday, March 20, 2012

Big problem

I have two databases that replicate with merge replication. A couple of days, the replication process failed while trying to do a re-initialization (with upload changes to publisher option enabled) and it seemed that some of the records in the subscriber
were missing. So I did a restore of the subscriber and then I then kicked off another re-initialization (with upload changes to publisher option enabled) and it has completed succesfully. However, now it seems that some of the older data that was created
in the subscriber are no longer in the subscriber but they are in the publisher. In addition to this, some of the records that were created in the subscriber did not upload to the publisher.
Is there any way to manually flag records to force them to replicate (for inserts)?
You could try doing a dummy update on the relevant rows (or all rows if necessary). Something like
Update MyTable set fname = fname
should do it.
HTH,
Paul Ibison
|||Yes, I tried this, but the problem is that I need to know which column has changed for each row. Is there any way to get it to replicate the whole row?
|||In your first post you explain that there are some rows on the publisher which don't exist on the subscriber and vice-versa. For some reason the merge triggers didn't fire and MSmerge_contents doesn't contain the the row value, so it is not replicated. Up
dating these rows - any column - will force an entry to this system table, and this should then be replicated. However your second post explains you need to know which column has changed for each row, which is what confuses me . Why is this required - d
o you also have rows which which exist on both publisher and subscriber but are not synchronized and contain different data?
Regards,
Paul Ibison
|||to force a row to be replicated again use sp_mergedummyupdate.
When the update is done on the other end SQL Server constructs the parameters for the stored procedure so that only the changed column is updated. So, it is stored somewhere. Figuring out where is not for mere mortals such as I - it is for the likes of su
ch as Mr. Ibison
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
|||Paul,
Yes, sorry, I was not clear in my first description of the problem. There are some instances where there is already a recod there but it is an older version, and there are some instances where the records are not there at all. I was mixing the two problem
s up.
Thank you (and Hilary) for your answers. they have been very helpfull.

No comments:

Post a Comment