Unique key for replication

All tables that are replicated must have a replication key that is composed of one or more columns that uniquely identifies each row. The replication key must be the same on all servers that participate in the replicate. Typically, the replication key is a primary key constraint.

Replicated tables must use a primary key constraint, a unique index or constraint, or the ERKEY shadow columns as the replication key. If your table does not have a primary key or you want to change primary key values while replication is active, you can specify a different key as the replication key. Specify an existing unique index or constraint, or the ERKEY shadow columns as the replication key when you create a replicate. A unique index and a unique constraint are equivalent as replication keys.

If you specify ERKEY columns as the replication key, Enterprise Replication creates a unique index and a unique constraint on the ERKEY columns. The ERKEY columns require storage space.

Important: Because primary key updates are sent as DELETE and INSERT statement pairs, avoid changing the primary key and updating data in the same transaction.