我正在使用合并复制。身份范围管理是自动的
I am using Merge Replication. The Identity range management is AUTOMATIC
i在具有插入ID的SERIALNUMBERSCHEME表中行的公司表上触发了
i HAVE A TRIGGER ON COMPANIES TABLE WHICH INSERTS ROWS IN SERIALNUMBERSCHEME TABLE which has documentID as identity column
在同步过程中我遇到以下错误
While synchronizing i am getting below error
SERVER\MUMBAI.PROD_SUB处的行插入无法传播到 SERVER'NEWYORK。 PROD。此失败可能是由于违反约束引起的。当IDENTITY_INSERT设置为ON或将复制用户插入到NOT FOR REPLICATION身份列中时,必须为表'SerialNumberScheme'中的身份列指定显式值。
A row insert at 'SERVER\MUMBAI.PROD_SUB' could not be propagated to 'SERVER\NEWYORK.PROD'. This failure can be caused by a constraint violation. Explicit value must be specified for identity column in table 'SerialNumberScheme' either when IDENTITY_INSERT is set to ON or when a replication user is inserting into a NOT FOR REPLICATION identity column.
数据已在订阅服务器上正确插入,但未在发布服务器上复制
Data is inserted properly at subscriber but not replicated at publisher
任何解决方案/建议?
推荐答案当复制代理应用更新时,触发触发器之类的声音。通常,触发器应仅在发布者(或更确切地说,在插入原始数据的站点)上运行。然后复制将复制触发器的效果。我认为您只需要将触发器标记为不可以复制。
Sounds like your trigger gets fired when the replication agent applies the updates. Normally the trigger should run only at the publisher (or more precisely, at the site which inserts the original data). Then replication will replicate the effect of the trigger. I think that all you need is to mark the trigger as NOT FOR REPLICATION.
请参见使用NOT FOR REPLICATION来控制约束,标识和触发器。
更多推荐
复制
发布评论