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 Mirror Replication Agent instance, use this procedure to facilitate resetting the environment.

StepsResetting the primary database for replication

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

    pdb_init move_truncpt
    

    Alternately, you can use the following Oracle command:

    alter system archive log current ;
    
  2. To retain marking and log device information, re-initialize the Mirror Replication Agent using ra_init with the force option, which forces the Mirror Replication Agent repository to be refreshed instead of overwritten:

    ra_init force
    

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

    See the Mirror Replication Agent Reference Manual.

  3. Reset the locator stored in Replication Server:

    isql -USAMPLE_RS_RSSD_prim -PSAMPLE_RS_RSSD_prim_ps
    -SSAMPLE_RS_ERSSD -DSAMPLE_RS_ERSSD
    
    
    
    rs_zeroltm NY, NYora92
    
    go
    

    The following appears:

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