Adding or dropping primary keys

Replication Server depends on primary keys to find the correct rows at the replicate or standby table. To add a the column zip as a primary key to the replication definition, enter:

alter replication definition publishers_rep
add primary key zip

To drop a primary key, enter:

alter replication definition publishers_rep
drop primary key zip

To replace all primary key columns, first alter the corresponding replication definition to add the new primary keys, then drop the old primary key columns in the table.

WARNING! If all primary key columns are missing from the primary table, the DSI will shut down.