dbTalk Databases Forums  

Merge replication: How to avoid duplicates of records?

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Merge replication: How to avoid duplicates of records? in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
yashgt@gmail.com
 
Posts: n/a

Default Merge replication: How to avoid duplicates of records? - 08-21-2007 , 07:19 AM






We have a simple problem:
We have a table Assets[asset_id, title] and a table
Asset_Versions[asset_id, version_no]. In addition, there are columns
added by replication for storing the ROWGUID.
After synchronzation, assume both Node1 and Node2 have
Assets(1,'XYZ') and Assets_Versions(1,1)

Before syncing again a new version is added at both nodes so that both
Node1 and Node2 have
Assets(1,'XYZ') and Assets_Versions(1,1)(1,2)

Now when it syncs again, the publisher will make another entry of
Assets_Versions(1,2) in the subscriber thus disturbing the business
logic because the Subscriber will now have 2 entries for version_no=2.

How can we make Replication identify this as a conflict. Can we write
a conflict resolver for such a situation so that we can choose the
entry that was made last and make it the winner?

Thanks and regards,
Yash


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.