question

78669366 avatar image
0 Votes"
78669366 asked Cathyji-msft commented

The insert failed. It conflicted with an identity range check constraint in database

Hi

When identity inserting into a table involved in merge replication I am getting the 'The insert failed. It conflicted with an identity range check constraint in database...' error. I have increased both 'Publisher range size' and 'Subscriber range size' to 200000 from 10000 and 1000 respectively. The threshold is still set to 80.

I have also run

 exec sp_adjustpublisheridentityrange @table_name = 'MyTable'

I am still getting the same error. What can I do to fix this?

Thanks

Regards


sql-server-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Hi @78669366,

We have not received a response from you. Did the reply could help you? If the response helped, do "Accept Answer". If it is not work, please let us know the progress. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

0 Votes 0 ·

1 Answer

Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered

Hi @78669366,

The insert failed. It conflicted with an identity range check constraint in database...'

Please try below steps;

  1. Change the identity range of the table from SSMS. Publisher>replication> Local replication > replication properties > Article Properties> Identity Range Management options> Change the appropriate values.

  2. Run the sp_adjustpublisheridentityrange stored proc on the Publisher.

  3. From the subscriber, force-synchronise the servers.

Refer to the thread Insert into replicated table fails - identity range check to get detail information.

Please also check if this blog The insert failed. It conflicted with an identity range check constraint could help you.


If the response is helpful, please click "Accept Answer" and upvote it, thank you.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.