all groups > sql server replication > april 2004 >
You're in the

sql server replication

group:

Primary Key Constraint errors when replicating


Primary Key Constraint errors when replicating Aaron
4/28/2004 11:11:02 AM
sql server replication:
Re: Primary Key Constraint errors when replicating Paul Ibison
4/28/2004 10:39:12 PM
Aaron,
the check constraints should preclude duplicate primary key values being
entered. When you say Primary Key constraint errors, are these from
duplicates, or from the range having been used up? Could you check the
publisher and each subscriber's check constraints and post up what you find,
as well as the text of the error message.
TIA,
Paul Ibison

Re: Primary Key Constraint errors when replicating Michael Hotek
4/29/2004 9:53:11 AM
Turn off the auto identity management and manage the ranges yourself.

--

Mike
Principal Mentor
Solid Quality Learning
"More than just Training"
SQL Server MVP
http://www.solidqualitylearning.com
http://www.mssqlserver.com

Re: Primary Key Constraint errors when replicating Aaron Davis
5/3/2004 5:42:14 AM


How does one go about managing auto identity ranges without using sql
server?

Thanks!

*** Sent via Developersdex http://www.developersdex.com ***
Re: Primary Key Constraint errors when replicating Aaron Davis
5/3/2004 5:42:15 AM
The errors are from duplicates. The errors occur on the clients with
subscriptions. It seems that it runs fine for a while then the
duplicate key errors start popping up. It seems like the ranges quit
getting assigned. I'm really not sure. Several people have mentioned
that I should assign the ranges myself, How would I go about doing that?

Aaron R. Davis
Development Manager
MDTablet, LLC
www.mdtablet.com

*** Sent via Developersdex http://www.developersdex.com ***
Re: Primary Key Constraint errors when replicating Aaron Davis
5/3/2004 11:48:01 AM
Mike,

Thanks for the article. I read the article and you mention that with
SQL Server 2000 you can set these ranges when setting up replication,
which I am doing but still seem to run into problems. How,
specifically, do I manually set a range for each subscriber.

Thanks,

Aaron R. Davis
Development Manager
MDTablet, LLC
www.mdtablet.com

*** Sent via Developersdex http://www.developersdex.com ***
Re: Primary Key Constraint errors when replicating Michael Hotek
5/3/2004 1:02:14 PM
http://www.mssqlserver.com/replication

--
Mike
Principal Mentor
Solid Quality Learning
"More than just Training"
SQL Server MVP
http://www.solidqualitylearning.com
http://www.mssqlserver.com

Re: Primary Key Constraint errors when replicating Michael Hotek
5/4/2004 8:23:22 PM
Go back to that section. There is a specific article in there which details
one approach to manually managing ranges.

--

Mike
Principal Mentor
Solid Quality Learning
"More than just Training"
SQL Server MVP
http://www.solidqualitylearning.com
http://www.mssqlserver.com

Re: Primary Key Constraint errors when replicating Aaron Davis
5/5/2004 6:10:46 AM
Mike,

I understand the method in which you recommend assigning ranges. In
that article, you mention that if you are using sql server 2000 this can
be done automatically through the article properties, which I am doing.
My problem is that we periodically have updates to our database which
forces us to drop replication, make the changes, and setup replication
again. In those instances we start experiencing primary key
errors(duplicates being assigned) and I believe it stems from the auto
identity range assignment being reseeded. What can I do to solve this.

Thanks,

Aaron R. Davis
Development Manager
MDTablet, LLC
www.mdtablet.com

*** Sent via Developersdex http://www.developersdex.com ***
AddThis Social Bookmark Button