Enabling and disabling replication for marked tables

If you need to temporarily suspend replication from a table, you can use the pdb_setreptable command to disable replication for the marked table. When you are ready to resume replication from the marked table, you can use the pdb_setreptable command to enable replication.

To replicate transactions in the primary database, the primary table that contains the data affected by the transactions must be marked for replication and replication must be enabled for that table.

NoteMarking a table for replication is separate from enabling replication for the table. See “Marking and unmarking primary tables” for more information on marking a table for replication.

The Replication Agent marked objects table contains an entry for each marked table in the primary database. Each marked table row contains a flag indicating whether replication is enabled or disabled for the marked table.

When replication is disabled for a marked object, the marking infrastructure remains in place, but no transactions for that object are captured in the transaction log.

NoteIf you need to change the schema of a marked table in the primary database, you must first unmark the table to remove the transaction log objects that Replication Agent creates for the primary table. See “Marking and unmarking primary tables” for more information.