[SQL] Error message when you try to batch insert data on a publisher of a merge replication...

Full Title: Error message when you try to batch insert data on a publisher of a merge replication in SQL Server 2008 or SQL Server 2005: "Msg 548, Level 16, State 2, Line 1. The insert failed"

Symptoms
Consider the following scenario. In SQL Server 2008, you configure a merge publication. You add a table that contains an identity column to the merge publication. Then, you try to perform a batch insert into the table on the publisher. In this scenario, you may receive the following error message on the publisher.

Msg 548, Level 16, State 2, Line 1

The insert failed. It conflicted with an identity range check constraint in database ' DatabaseName ', replicated table ' Schema . TableName ', column ' ColumnName '. 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.

http://support.microsoft.com/default.aspx?scid=kb;en-us;972006

Published Tuesday, June 02, 2009 7:33 AM by Cliff Hobbs - MVP