合并复制第一个快照不起作用
Merge Replication First Snapshot don't work
在合并复制中进行第一次同步时,出现此错误:
"Cannot delete table 'dbo.eqp_Equipment' because it is being referenced by a FOREIGN KEY constraint. (Source: MSSQLServer, Error number: 4712)"
然后我将 "Action if name is in use" 更改为 "Truncate all data in the existing object",然后我遇到了同样的问题:
"Cannot truncate table 'dbo.eqp_Equipment' because it is being referenced by a FOREIGN KEY constraint. (Source: MSSQLServer, Error number: 4712)"
我该如何解决这个问题?
合并复制不保证事务的一致性,也不保证更改按接收到的顺序应用。即在订阅者上,子 table 可以在父之前更新。您有几个选择:
- 在订阅者上标记外键"NOT FOR REPLICATION"。这告诉 SQL 服务器忽略复制的 FK 约束。
- 为合并文章指定 processing order
在合并复制中进行第一次同步时,出现此错误:
"Cannot delete table 'dbo.eqp_Equipment' because it is being referenced by a FOREIGN KEY constraint. (Source: MSSQLServer, Error number: 4712)"
然后我将 "Action if name is in use" 更改为 "Truncate all data in the existing object",然后我遇到了同样的问题:
"Cannot truncate table 'dbo.eqp_Equipment' because it is being referenced by a FOREIGN KEY constraint. (Source: MSSQLServer, Error number: 4712)"
我该如何解决这个问题?
合并复制不保证事务的一致性,也不保证更改按接收到的顺序应用。即在订阅者上,子 table 可以在父之前更新。您有几个选择:
- 在订阅者上标记外键"NOT FOR REPLICATION"。这告诉 SQL 服务器忽略复制的 FK 约束。
- 为合并文章指定 processing order