简体   繁体   中英

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM