Resetting the primary Oracle database for replication

In a test environment, you may occasionally need to reset the replication environment. Instead of deleting and re-creating a new Replication Agent instance, use this procedure to facilitate resetting the environment:

StepsTo reset the primary database for replication

  1. Protect your new environment from old log information by using the following command in the Replication Agent to archive all current redo log data:

    pdb_xlog move_truncpt
    
  2. To retain marking and log device information, reinitialize the Replication Agent using pdb_xlog init with the force option, which forces the Replication Agent repository to be refreshed instead of overwritten:

    pdb_xlog init,force
    

    NoteIf you prefer to delete and replace all the information in the Replication Agent repository, issue the pdb_xlog remove command followed by a normal pdb_xlog init command (without the force option).

  3. Zero-out the locator stored in Replication Server using the rs_zeroltm command. For example:

    isql -USAMPLE_RS_RSSD_prim -PSAMPLE_RS_RSSD_prim_ps
    -SSAMPLE_RS_ERSSD -DSAMPLE_RS_ERSSDrs_zeroltm NY, NYora92
    go
    

    The following is displayed:

    Locator has been reset to zero.
    (return status = 0)