You are currently offline, waiting for your internet to reconnect

"Cannot find the identity range allocation entry for the Subscriber" error when you add an article to a SQL Server merge publication

Extended support for SQL Server 2005 ended on April 12, 2016

If you are still running SQL Server 2005, you will no longer receive security updates and technical support. We recommend upgrading to SQL Server 2014 and Azure SQL Database to achieve breakthrough performance, maintain security and compliance, and optimize your data platform infrastructure. Learn more about the options for upgrading from SQL Server 2005 to a supported version here.

When you add an article to a merge publication in Microsoft SQL Server, you receive the following error message:

<Time stamp> Category:SQLSERVER
Source: <Publisher>
Number: 20671
Message: Cannot find the identity range allocation entry for the Subscriber in the MSmerge_identity_range table. Reinitialize the subscription.

This issue occurs if the following conditions are true:
  • The merge publication is in one of the following versions of SQL Server:
    • Microsoft SQL Server 2005 
    • Microsoft SQL Server 2008 
    • Microsoft SQL Server 2008 R2 
    • Microsoft SQL Server 2012
  • The merge publication contains articles that have identity range management enabled. 
  • All articles that have identity range management enabled have the @subscriber_upload_options = 2 definition. 
  • The subscription has the @subscriber_type = N'Local' definition.
  • The article that is being added has the @subscriber_upload_options = 0 definition.
To resolve this issue, reinitialize the subscribers.

Note To avoid this issue completely, before the subscriptions are initialized for the first time, configure at least one article that has identity range management enabled, and then set the upload option to @subscriber_upload_options = 0.
The issue occurs because the merge agent believes that the information about the empty MSmerge_identity_range table is corrupted. Therefore, SQL Server asks for the reinitialization.

During the initialization of the subscriber, an MSmerge_identity_range table is created at the subscriber. However, no data is populated because all articles have the @subscriber_upload_options=2 definition. Therefore, no change is expected to occur at the subscriber. When you add an article, the merge agent checks the subscriber MSmerge_identity_range table in order to set up the ranges for the new article.
More information
  • For more information about the subscriber_upload_options argument, see sp_addmergearticle (Transact-SQL).
    • The @subscriber_upload_options = 2 definition means that changes are not enabled at the subscriber. 
    • The @subscriber_upload_options = 0 definition means that there are no restrictions. The changes that were made at the subscriber are uploaded to the publisher.
  • For more information about the subscriber_type argument, see sp_addmergepullsubscription (Transact-SQL).

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Article ID: 2832689 - Last Review: 04/29/2013 21:50:00 - Revision: 1.0

Microsoft SQL Server 2005 Enterprise Edition, Microsoft SQL Server 2008 Enterprise, Microsoft SQL Server 2008 R2 Enterprise, Microsoft SQL Server 2012 Enterprise

  • kbsql2005repl kbsurveynew kbtshoot kbexpertiseadvanced KB2832689