Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

Identity range check constraint issue

$
0
0

Hi All,

We have replication in Microsoft SQL Server 2008 R2 (SP3) version for which there are two subscribers on Different servers and it was working fine till last week. Lat week we got the following issue:

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The insert failed. It conflicted with an identity range check constraint in database 'XXX', replicated table 'dbo.xxx', column 'xxx'. If the identity column is automatically managed by replication, update the range as follows: for the Publisher, execute sp_adjustpublisheridentityrange; for the Subscriber, run the Distribution Agent or the Merge Agent.

We searched for above issue and found that identity range of problematic table was different in Publication and Subscriptions. We reseeded the identity range manually everywhere using the following queries:

DBCC CHECKIDENT('XXX', RESEED, 1234)

and taken reference from the below link:

https://support.microsoft.com/en-in/kb/953481

Now thing is that whatever we applied above is a workaround.We came to know about this issue when client raised that something is not working into application. So either we need to keep our eyes active on it continuously within five minutes whether identity ranges are correct or not (that would be too much panic) or let client raise the issue and then solve this manually as we did(which would be frustrating for client to get the issue after sometime and we will have always a fear to loose client).

Therefore please let us know that Is there any permanent solution so that this problem doesn't occur going forwards (we have already set higher identity ranges for publication and subscription and identity ranges are set as Auto).

Any help would be appreciated. Thanks in advance.

Regards,

Rama



Viewing all articles
Browse latest Browse all 4054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>