Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 939318 - Last Review: November 12, 2007 - Revision: 1.2
Error message when you insert data in an article that has automatic identity range handling enabled in a merge replication in SQL Server 2000: "The identity range managed by replication is full and must be updated by a replication agent"
In a Microsoft SQL Server 2000 merge replication, when you insert data in an article that has automatic identity range handling enabled, you receive the following error message:
Server: Msg 548, Level 16, State 2, Line 1
The identity range managed by replication is full and must be updated by a replication agent. The INSERT conflict occurred in database 'p', table 't2', column 'id'. Sp_adjustpublisheridentityrange can be called to get a new identity range.
The statement has been terminated.
After you receive the error message, you synchronize the data for the publication. Then, when you insert some records from the publication and from one of the subscriptions into the article, you receive the following error message:
Server: Msg 2627, Level 14, State 1, Line 1
Violation of PRIMARY KEY constraint 'PrimaryKeyName'. Cannot insert duplicate key in object 'TableName'.
The statement has been terminated.
This problem occurs if the following conditions are true:
- A merge replication has two articles.
- Each article has an identity column.
- Automatic identity range handling is enabled for both articles.
- The publication has two or more subscriptions.
- You insert the data in the second article.
This issue occurs because the same identity values are incorrectly inserted at the publisher and at the subscriber. This causes a conflict.
To resolve this issue, upgrade to SQL Server 2005.
To work around this issue, reinitialize the subscriptions for the publication after you add the new article.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
MORE INFORMATION
Steps to reproduce the behavior
- In SQL Server 2000, configure a merge replication.
-
Add an article that has an identity column.
-
Enable automatic identity range handling for the article.
-
Add two or more subscriptions to the publication.
-
Add another article that has an identity column.
-
Enable automatic identity range handling for the second article.
- Generate the snapshot, and then synchronize the data for the publication.
- Run the following statement on these subscriptions:
select * from <SubscriptionDatabase>..MSrepl_identity_range
Notice that the next_seed values of the identity column of the second article on all the subscriptions are the same. However, these values should be different. - Insert some records in the second article.
APPLIES TO
- Microsoft SQL Server 2000 Enterprise Edition
- Microsoft SQL Server 2000 Enterprise Edition 64-bit
- Microsoft SQL Server 2000 Developer Edition
| kberrmsg kbexpertiseadvanced kbtshoot kbprb KB939318 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please