We did the following:
We setup a database with all of standard tables, views, etc.
We then put in place merge replication for a few of the tables within this database, including a tables called "Areas".
We can execute SQL statements to insert rows into this table fine.
We then applied an update script for this database to change a few tables by adding fields and changing indexes, etc. We didn't change the "Areas" table though.
After the update to the database structure, we get an error when trying to insert into this "Areas" table.
The error message was the following:
The insert failed. It conflicted with an identity range check constraint in database 'AETest', replicated table 'dbo.Areas', column 'AREPrimaryId'. 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.
What would cause such a problem and how do we resolve it? The structure of the "Areas" table before and after the update is the following:
/****** Object: Table [dbo].[Areas] Script Date: 08/24/2010 17:42:36 ******/
View Complete Post