May 23, 2011 at 9:56 am
We've recently migrated from a SQL 2005 configuration over to 2008 R2 and are now experiencing an error on publications that contain tables with identity fields.
I know that when you replicate an identity field, the publisher doles out ranges to each subscriber and maintains the ranges.
So when a subscriber fills up its range, it asks the publisher for a new range.
The problem we're seeing is that tables that have identity fields and are replicated but not being used by any process are throwing an error saying that it was unable to obtain a new identity range.
Here is the message from the job history:
...
2011-05-23 15:11:02.316 The Publisher failed to allocate a new set of identity ranges for the subscription. This can occur when a Publisher or a republishing Subscriber has run out of identity ranges to allocate to its own Subscribers or when an identity column data type does not support an additional identity range allocation. If a republishing Subscriber has run out of identity ranges, synchronize the republishing Subscriber to obtain more identity ranges before restarting the synchronization. If a Publisher runs out of identit
2011-05-23 15:11:02.425 Category:NULL
Source: Merge Replication Provider
Number: -2147199417
Message: The Publisher failed to allocate a new set of identity ranges for the subscription. This can occur when a Publisher or a republishing Subscriber has run out of identity ranges to allocate to its own Subscribers or when an identity column data type does not support an additional identity range allocation. If a republishing Subscriber has run out of identity ranges, synchronize the republishing Subscriber to obtain more identity ranges before restarting the synchronization. If a Publisher runs out of identit
2011-05-23 15:11:02.518 Category:SQLSERVER
Source: NTIIARDB
Number: 20666
Message: Cannot refresh the identity range and/or the check constraint on the Publisher. Ensure the following: that the value in the identity column has not reached the maximum for the data type in the identity column; and that the user who made the last insert has the privileges to drop and re-create the check constraint.
In this publication, there is one table that has an identity field and has not had records added to it since august 2010 and the total record count is 6; so this table must be the cause of the error message.
We have the job scheduled to run every 5 minutes throughout the day and this message shows up about once an hour or so randomly throughout the day.
Data is still being replicated normally even when this message shows up.
How can I resolve this issue?
Thanks in advance,
Ben
May 23, 2011 at 3:41 pm
If the table is duly ever updated I would suggest removing the identity and adding a trigger to assign the pk for inserts. Easy fix but not recommended on tables with alot of activity.
May 24, 2011 at 1:45 pm
I believe your solutions would help, but I don't think that would solve the issue.
There are tables with identity columns used by a 3rd party software that we cannot change.
So changing the identity to a trigger will not work for all tables in my databases.
This issue is affecting 4 different publications that contain about a dozen tables from 4 different databases.
Only the publications with tables that have identity fields are being affected.
Many of these tables are updated regularly and I could see those filling up the range and throwing the error.
But what is puzzling is that this message is showing for a table that does not have inserts/updates/deletes made against it.
This tells me that either something is configured wrong or there is a bug in the system.
I am continuing to see these errors show up constantly throughout the day with seemingly no provocation.
Any ideas on how to solve this?
Ben
June 8, 2011 at 12:27 pm
I'm still seeing this error in my repl logs and event viewer. Anyone have any ideas?
January 6, 2012 at 11:29 am
Ben, have you had any luck resolving this?
I too see this. I'm upgrading from 2005, with four republishers. I'm trying new topologies: 6 Republishers, and No Republishers. In both scenarios, I see this ID problem. With the repubs, it is between the Master and the Repub. With No Repubs, it is between the CE subscriber, and the publisher.
January 6, 2012 at 12:01 pm
I need to solve this, so I may end up opening a case with MS...
So far, it appears that it isn't a *real* ID conflict:
1) Subsequent syncs work without giving the same error
2) The errors increase logrithmically as the load is increased
I'm guessing some kind of blocking/lock conflict. I'm going to try a trace with the blocking report. Anyone have a better way to look for such an internal conflict?
December 6, 2012 at 12:51 am
Did anyone ever happen to resolve this issue? I have been reading a lot about the identity issue with merge replication on SQL 2008, but havent come across a solution yet. This issue is haunting me. This happens on articles that have lot of activity. It is not that the entire range allocated us used up, rather sometimes it is 20% used up and a new range is allocated, sometimes 50%, sometimes 100% as expected, and sometimes it doesnt allocate new range at all.
Someone please let me know if there is a fix to this. I am also planning to open a case with MS, soon if dont find a resolution on net.
Thanks in advance.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply