The most common primary key problems are:
The replicate table’s primary key constraint does not identify the same columns as the primary table’s primary key.
The replicate table has a primary key constraint, but the replicate article does not subscribe to all the columns in the primary table’s primary key.
The replicate table has a primary key constraint, but the primary table does not.
The replicate table’s primary key constraint includes a column that allows null values in the primary table.
The datatype of a primary key column in the replicate table is different than the datatype in the corresponding primary table column.
All these problems can allow a replicated operation that attempts to create a row with non-unique data in the replicate table’s primary key column (or columns).
To avoid primary key problems in a replication system, you can either remove the primary key constraint on the replicate table, or:
Make sure that the primary table and replicate table identify the same columns for their primary key constraints.
Make sure that the replicate article subscribes to all the primary table’s primary key columns.
Make sure that both primary and replicate tables use the same datatype (and length) for all replicated primary key columns.