Suppose there are some rows at the publisher which are not at the subscriber. Or vice versa. This is after a successful synchronization….
Other posts have dealt with how this can occur, and how we can stop it happening, but suppose it has happened – what to do?
Well there is a nice stored procedure which comes to our rescue: sp_mergedummyupdate. We just need the name of the table and the rowguid.
exec sp_mergedummyupdate @source_object = ‘tCity’, @rowguid = ‘724FEE04-F8DB-E611-9BE5-080027A1E9BF’
It is very robust – if we give it the rowguid of a non-missing row there will just be an update propagated and we won’t end up with duplicates. Likewise if we try running it more than once there won’t be an issue.
Just run the proc at the publisher or the subscriber (whichever one has the missing rows) and then synchronize – job done!