Can I use NOT FOR REPLICATION in Merge Replication with rowguid() field?
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.
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.
精彩评论