Altering Database Replication Definitions

Use alter database replication definition to change a database replication definition.

alter database replication definition allows you to replace one filter at a time. For example:
alter database replication definition rep_1C
  with primary at PDS.pdb
  not replicate tables in (table2)
  with dsi_suspended

See the Replication Server Reference Manual for complete syntax and usage information.

When you execute alter database replication definition, Replication Server writes an rs_marker to the inbound queue. The command does not take effect until the marker reaches the Distributor (DIST), which will by then have rebuilt the Database Subscription Resolution Engine (DSRE) to incorporate the changes.

Altering a database replication definition with associated subscriptions may desynchronize replicate tables. To resynchronize, you can either:
  • Quiesce Replication Server, drain the transaction log, and apply changes manually, or

  • Use the with_dsi_suspended option, which causes the replicate Replication Server to suspend the replicate DSI when it reads the “alter database replication definition” marker.

To alter a database replication definition and resynchronize replicate tables:

  1. Execute alter database replication definition and include the with dsi_suspended phrase.
  2. Wait for the replicate DSI to suspend.
  3. Use bulk materialization to resynchronize replicate tables.
  4. Resume the connection.