title: Insert into replicated table fails - identity range check
body: <p>I'm trying to insert a few thousand rows into a table in a database that is replicated across two servers. From either the publisher or the subscriber, I get the same error:</p>
  
  <pre><code>Msg 548, Level 16, State 2, Line 1
  The insert failed. It conflicted with an identity range check constraint in database 'XXX', replicated table 'dbo.NODE_ATTRIB_RSLT', column 'ID'. 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.
  </code></pre>
  
  <p>Checking the constraint on the table, it seems to me like I should be able to insert at least 1000 rows at a time before running into issues. However, I get the same error when trying to insert just a few tens of rows!</p>
  
  <p>Here's how I'm trying to insert data:</p>
  
  <pre><code>insert into NODE_ATTRIB_RSLT 
  ([NODE_ID]
        ,[ATTRIB_ID]
        ,[STATE_ID]
        ,[PLAN_REVISION_ID]
        ,[TIMESTAMP]
        ,[VALUE]
        ,[VALUE_TEXT]
        ,[LAST_MODIFIED]) 
  SELECT [NODE_ID]
            ,[ATTRIB_ID]
            ,[STATE_ID]
            ,[PLAN_REVISION_ID]
            ,[TIMESTAMP]
            ,[VALUE]
            ,[VALUE_TEXT]
            ,[LAST_MODIFIED]   FROM [NODE_ATTRIB_RSLT_TEMP]
  </code></pre>
  
  <p>The PK column is an autogenerated identity called ID. To try to insert fewer rows at a time I've added a WHERE clause at the end of the select like so:</p>
  
  <pre><code>WHERE ID &gt;= 1000 and ID &lt;1100
  </code></pre>
  
  <p>but to no avail.</p>
  
  <p>Running sp_adjustpublisheridentityrange on the Publisher executes successfully but has no effect.</p>
  
  <p>How can I fix this problem with inserts?
  How can I modify the ranges of the indentity range contraints to a more reasonable level while leaving the replication running?</p>