Monday, March 26, 2012

MSDE 2000 Replication Conflict

I am using MSDE 2000 for my replication. the problem is that althought at time creating publication it inserts GUID into every table but if one table in 2 nodes has same primary key, it inserts only one row ( accorrding to prority ). there are some Conflict Reslover methods that can be used for this purpose. i wanted to ask that is there any other way for me to resolve this conflict. i am asking for a new way because my database schema has been created and a lot of coding behalf of that schema has been done.

I'd be thankful if you guide me.
Regards,

Are you trying to insert the same primary key at both nodes? In your case, conflict resolver won't work for you because although you have inserted at both nodes, they are treated as different rows with different rowguid. What are you trying to achieve in this scenario? Do rows with same primary key stand for the same thing in your business scenario?

You can also refer to this post to see if you have the same problem: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=509453&SiteID=1

Hope it helps

Wanwen

|||Dear Wanwen.

i have a scenario as follows.

I have one publisher and two subscribers. a table called "Companies" is my article. That "Companies" table has a primary key column called CompanyId which is an Identity Row. Now when i insert data into subscribers i will have two rows with same Primary key. For Example two rows with CompanyId 1. Now at time of merging data, i want both companyIds ( both rows with Pk 1 ) be present in publisher. But at reality it does not happen.

What should i do?! because i need both rows at publisher .

Note: i have to mention that at time of creating Subscription GUID is included by SQL Server. So why is it not working?!

Regards,|||

In your case, you need to use identity range management. Please refer to BOL topic: Replicating Identity Columns. Basically, to use identity columns in a replication topology that has updates at more than one node, each node in the replication topology must use a different range of identity values, so that duplicates do not occur. You could use auto for Identity Range Management Option and specify @.pub_identity_range, @.identity_range and @.threshold.

Rowguid column added by replication is for change tracking, conflict detecting and resolving, not for failure to apply changes due to constraint.

Hope it helps.

Wanwen

sql

No comments:

Post a Comment