我可以在带有 rowguid() 字段的合并复制中使用 NOT FOR REPLICATION 吗?
我想使用合并复制,我有 INDETITY 列,我面临重复的 id 号问题,我有另一个带 PK 的字段,我不能使用我的 ID 字段作为 PK,我正在使用 SQL 2000。
感谢您的帮助。
I want to use merge replication and I have INDETITY column and I faced with duplicate id number proglem, and I have another field with PK I can't use my ID field as PK, I am using SQL 2000.
Thanks for all your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在SQL Server 200 合并复制拓扑中使用NOT FOR REPLICATION设置来获取IDENTITY值。
参阅使用不用于复制
请 主键,为什么会面临潜在的重复值?通过专门定义拓扑中每个数据库的标识值的可能范围可以避免此问题。您可以在此处了解有关身份范围管理的更多信息。
还要考虑到 ROWGUID 值是全局唯一的,因此适合识别整个拓扑中的记录并避免冲突。为什么您不想想要复制它?
如果您的问题与主键约束有关,请考虑合并复制不要求每个复制表都有一个主键,这与事务复制不同。
You can use the NOT FOR REPLICATION setting in a SQL Server 200 Merge Replication topology for IDENTITY values.
See Using NOT FOR REPLICATION
Considering your Primary Key, why are you faced with potential duplicate values? This issue can be avoided by specifically defining the possible range of identity values at each database in the topology. You can read more about Identity Range Management here.
Consider also that a ROWGUID value is globally unique and so would therefore be suitable to identify records throughout the topology and avoid conflicts. Why would you not want to replicate it?
If your issue is instead concerning the Primary Key Constraint consider that Merge Replication does not require that each Replicated table has a Primary Key, unlike Transactional Replication.