Need help on sql server conflicts
-
Wednesday, December 26, 2012 12:30 PM
In sql server, while implementing peer peer replication, there is a 'insert-insert' conflict because data insert into two tables with same id.
Can anybody help me how to handle conflicts in sqlserver peer -peer replication and provide me examples and useful Urls on peer -peer replication?
Thanks in advance.
All Replies
-
Wednesday, December 26, 2012 3:55 PM
Check these two articles on how to solve your conflict:
- Marked As Answer by ravikiransid Thursday, December 27, 2012 11:44 AM
-
Wednesday, December 26, 2012 4:24 PMModerator
Basically what you have is a primary key collision here - it means that the same primary key value is assigned on both sides of a replication topology between synchronizations. If you are using the identity property you should set one side to have a different pool of identity ranges than the other - use dbcc checkident reseed for this.
Otherwise you should add a location identifier column to your server name on each side and add this column to your primary key.
looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941
- Proposed As Answer by Brandon WilliamsMicrosoft Community Contributor, Moderator Thursday, December 27, 2012 4:37 AM
- Marked As Answer by ravikiransid Thursday, December 27, 2012 11:44 AM
-
Thursday, December 27, 2012 11:44 AM
Thanks irusul and Hilary for the replies.
-
Thursday, December 27, 2012 12:17 PM
Hilary- If there are any conflicts by any of the way. Is there any way to configure email saying there is a conflict.
irusul- Now, I got a conflict insert-insert and now changed property of 'continue replication after conflicts occur to 'True' and now I am seeing polling from server a to server b but not from server b to server a.
I am not sure what went wrong and solution is fine before conflict occur. Can you help me in resolving my issue.
-
Thursday, December 27, 2012 1:42 PMModeratorI poll the msmerge_conflict_info table and send out email when changes occur there. You can always create a trigger on this table which will send out email when a conflict occurs.
looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

