2014-10-28 94 views
0

我有一系列在订阅服务器上创建的行未被复制到发布服务器。冲突查看器显示的5(Upload insert failed)的这个错误冲突类型:解决上传插入失败的合并冲突

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.

如果我点击“提交失败者”来解决它,我得到这个错误:

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)

我已经运行sp_adjustpublisheridentityrange任何新创建的行正在成功复制,但这些行仍然不会复制。保留在订户上创建的行ID是很重要的,所以我不能删除并重新插入行。我该如何解决这些冲突?

+0

这将很难告诉事后造成这种情况的原因。对于其中一个冲突,请尝试暂时禁用身份范围检查约束,然后尝试提交失败者。 – 2014-10-29 16:28:33

回答

0

此问题实际上不是由表A的标识列引起的,而是外键列。表B中的行表A中的行FK'd没有复制。我不知道为什么这些行没有复制。

我触发了复制,通过更新表B的每一行中的值,导致复制以查看更改并复制这些值。在复制完成后,表A中的每一行都会正确复制,并且所有内容都会再次同步。