I have a merge replication between toe databases named DB1 (publisher) and DB2(subscriber)
Full database is set for merge replication(with push).One of the table in database has a column 'ChangesPk' with datatype int which is a primary key and it is identity column(is identity=yes) with identity increment of 1.
@identityrangemanagementoption is set to manual.The replication was working fine from about a week.today i got a error when rows are inserting to subscriber database.The error was
The insert failed. It conflicted with an identity range check constraint in database 'DB1', replicated table 'dbo.tablename', column 'ChangesPk'. 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. The statement has been terminated.
The merge agent is scheduled to run once in a day and i got this error about 2 hours before the scheduled time.So this error didn't came while synchronizing.
The table has 3653 rows in publisher and 2450 rows in subscriber.I saw some of the articles in Microsoft and other website related to identity column,but i was not able to find reason for error in my case.Why this error comes when inserting values to subscriber database?how can i solve this?