Enabling and disabling replication for sequences

To temporarily suspend replication of a sequence, use the pdb_setrepseq command to disable replication for the marked sequence. When you are ready to resume replication of the marked sequence, use the pdb_setrepseq command to enable replication.

NoteBy default, no sequences are marked for replication.

To replicate updates of a sequence in the primary database, the sequence must be marked for replication and replication must be enabled for that sequence.

Marking a sequence for replication is separate from enabling replication for the sequence. See “Marking a sequence for replication”.

StepsEnabling replication for a marked sequence

  1. Log in to the Replication Agent instance with the administrator login.

  2. Verify that replication is disabled for the sequence:

    pdb_setrepseq pdb_seq
    

    Here, pdb_seq is the name of the marked sequence you want to enable replication for.

    If the pdb_setrepseq command returns information that the sequence is marked and has replication disabled, continue this procedure to enable replication for the sequence.

    NoteA sequence must be marked for replication before replication can be enabled or disabled for the sequence.

  3. Enable replication for the sequence:

    pdb_setrepseq pdb_seq, enable
    

    Here, pdb_seq is the name of the marked sequence for which you want to enable replication.

    After replication is enabled for the sequence, any invocation of that sequence is replicated.

  4. Use the pdb_setrepseq command again to verify that replication is now enabled for the sequence:

    pdb_setrepseq pdb_seq
    

    Here, pdb_seq is the name of the marked sequence for which you want to verify that replication is enabled.

StepsDisabling replication for a marked sequence

  1. Log in to the Replication Agent instance with the administrator login.

  2. Verify that replication is enabled for the sequence:

    pdb_setrepseq pdb_seq
    

    Here, pdb_seq is the name of the marked sequence you want to disable replication for.

    If the pdb_setrepseq command returns information that the sequence is marked and has replication enabled, continue this procedure to disable replication for the sequence.

    NoteA sequence must be marked for replication before replication can be enabled or disabled for that sequence.

  3. Disable replication for the sequence:

    pdb_setrepseq pdb_seq, disable
    

    Here, pdb_seq is the name of the marked sequence for which you want to disable replication.

    After replication is disabled for the sequence, any invocation of that sequence will not be captured for replication until replication is enabled again.

  4. Use the pdb_setrepseq command again to verify that replication is now disabled for the sequence:

    pdb_setrepseq pdb_seq
    

    Here, pdb_seq is the name of the marked sequence for which you want to verify that replication is disabled.