Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Handling Conflicts in Merge Replication


Handling Conflicts in Merge Replication

Author
Message
Satia Madimchetty
Satia Madimchetty
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 33
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/sMadimchetty/handlingconflictsinmergereplication.asp
Ian Yates
Ian Yates
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1214 Visits: 445

Excellent article - very informative. I like the detailed example about the common situations with stock systems and quantities on order, on shelf, etc... Thank you very much





Clifton Collins
Clifton Collins
SSC Journeyman
SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)

Group: General Forum Members
Points: 83 Visits: 194

The article is very informative. It encompasses some deviation to using replication beyond the "out of the box" solution. However, has Microsoft or anyone else thought about replication and XML? With SQL 2005 containing an XML data type, how will conflict resolution be handled if the XML data becomes a database inside the record?

We currently have a situation where the XML columns have become the bulk of the data in several databases. While replication works great along with conflict replication in a traditional database, only replication works great with XML in the mix. Our situation could, at a minimum, be considered field abuse and be gravitating toward worst practices, as a maximum. If it is accepted that at the minimum this is not a best practice, then could it be impractical to store XML in a database that requires replication? Should the best practice be the storing of data in a normalized database and return XML as needed?



Clifton G. Collins III
FroggEye
FroggEye
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 32
I have found the article to be more informative than some of what MS has put out there regarding conflict resolution! BigGrin

I do have a scenario where I know I need a custom resolver but just don't know how to impliment it. Here is my scenario if anyone is able to help or push me in the right direction please do...

I have one table (TagMstr) with one PK (TagId), several FK's, a rowguid column, and several other columns. A record for TagMstr can already be in the SQL2005 database but not replicated to the end-users filtered set of data yet (because it does not have their UserId associated to it). What happens on the device is a new TagMstr record is written with the same PK as what is in the server database. When I come to do a sync I get a duplicate record error. Although it is doing what it should, I need to make it take the insert performed on the device and perform an update on the server.

For instance in the tables below I need to update the server record with the yellow fields from the device record and remove the rowguid or rewrite the rowguid on the device. Is there already some type of conflict resolver which would do this or what type of resolver would I need?


jpdlp
jpdlp
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 49
Nice article.

And if the conflict was on the [Unit Stock] ?

Example:

In the article table, article X's article stock is 5
subscriber 1 sold 1 unit and updated article stock to 4
subscriber 2 sold 2 units and updated article stock to 3

when they synchronize, there will be a conflict on article stock, and none of them is right. The right value should be 5-1-2 = 2

How can i accomplish this?

Thanks for your help!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search