Wednesday, March 21, 2012

Merge replication problem

Dear Friends
I have setup merge replication for the stock database.
and facing strange problem i have ID as identity column
and the same is having property not for replication.
I am getting error for the primary key voilation and
found out the problem that the Site2 is giving the same
identity value which is already in the table. Please
suggest how i can solve the same.
Your guidence will help me to solve the problem.
Best regards
Sharad
Sharad,
if you have a limited number of subscribers, it's a good idea to choose an
identity seed/increament pair in such a way as there can be no overlap. For
example, it you just had a publisher and a single subscriber, you could have
odd and even values. There is an article by Michael Hotek which neatly
describes posibilities for many more subscribers:
http://www.mssqlserver.com/replicati..._identity.asp. I'd
set up your topology in this way so as to avoid any issues. This may involve
a lot of work initilally as you'll have to reinitialize, but in the long run
it'll make identities so easy you can set it up and then forget about it.
Regards,
Paul Ibison

No comments:

Post a Comment