Marking a sequence for replication

StepsMarking a sequence for replication

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

  2. Use the pdb_setrepseq command to determine if the sequence is already marked in the primary database:

    pdb_setrepseq pdb_seq
    

    Here, pdb_seq is the name of the sequence in the primary database that you want to mark for replication.

    • If the pdb_setrepseq command returns information that the specified sequence is marked, you do not need to continue this procedure.

    • If the pdb_setrepseq command returns information that the specified sequence is not marked, continue this procedure to mark the sequence for replication.

StepsMarking a sequence for replication

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

  2. Use the pdb_setrepseq command to determine if the sequence is already marked in the primary database:

    pdb_setrepseq pdb_seq
    

    Here, pdb_seq is the name of the sequence in the primary database that you want to mark for replication.

    Consider the following:

    • If the pdb_setrepseq command returns information that the specified sequence is marked, you do not need to continue this procedure.

    • If the pdb_setrepseq command returns information that the specified sequence is not marked, continue this procedure to mark the sequence for replication.

  3. Use the pdb_setrepseq command to mark the sequence for replication.

    The pdb_setrepseq command allows you to mark the primary sequence to be replicated and specify a different sequence name to use in the replicate database.

    • Use the following command to mark the sequence for replication when the sequence name you wish to increment at the standby site has a different name:

      pdb_setrepseq pdb_seq, mark
      

      Here, pdb_seq is the name of the sequence in the primary database that you want to mark for replication.

      NoteReplicating a sequence with a different name than the provided name is consistent with other marking commands but is not a typical configuration.

    • Use the following command to mark the sequence for replication using a different sequence name:

      pdb_setrepseq pdb_seq, rep_seq, mark
      

      where:

      • pdb_seq is the name of the sequence in the primary database that you want to mark for replication.

      • rep_seq is the name of the sequence in the standby database that you wish to increment.

      NoteReplicating sequence values to a sequence with a different name at the replicate database assumes that the replicate database sequence has the same attributes and starting value as the primary site's sequence.

      Consider the following:

      • If the value of the pdb_dflt_object_repl parameter is true, the sequence marked for replication with the pdb_setrepseq command is ready for replication after you invoke the pdb_setrepseq command successfully.

      • If the value of the pdb_dflt_object_repl parameter is true (the default value), you can skip step 4 in this procedure.

      • If the value of the pdb_dflt_object_repl parameter is false, you must enable replication for the sequence before replication can take place.

  4. Use the pdb_setrepseq command to enable replication for the marked 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, you can begin replicating invocations of that sequence in the primary database.