Dave Zych
Dave Zych

Reputation: 21897

Resolve Upload Insert Failed merge conflict

I have a series of rows created at the Subscriber that are not being replicated to the Publisher. The conflict viewer shows a Conflict Type of 5(Upload insert failed) with this error:

A row insert at '{subscriber}' could not be propagated to '{Publisher}'. This failure can be caused by a constraint violation. The merge process was unable to synchronize the row.

If I click "Submit Loser" to resolve it, I get this error:

The insert failed. It conflicted with an identity range check constraint in database '{Database}', replicated table '{Table}', column '{Column}'. 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. (Microsoft SQL Server, Error: 548)

I have run sp_adjustpublisheridentityrange and any new rows created are being replicated successfully, but these ones still won't replicate. It's important to keep the row Id's that were created on the subscriber, so I can't remove and re-insert the row. How can I resolve these conflicts?

Upvotes: 0

Views: 2158

Answers (1)

Dave Zych
Dave Zych

Reputation: 21897

This issue wasn't actually caused by the identity column of table A, it was a foreign key column. The row in table B that the rows in table A FK'd to did not replicate either. I don't yet know why those row didn't replicate.

I triggered replication by updating a value in each row of table B which caused replication to see a change and replicate those. After those were replicated, each row in table A replicated correctly and everything is in sync again.

Upvotes: 1

Related Questions