Resetting the Primary Oracle Database for Replication

In a test environment, you may occasionally need to reset the replication environment.

  1. Log in to the Replication Agent and suspend replication:
    isql -Usa -Psa_pass -Smyra 
    suspend
    go
  2. Set the transaction log truncation point to the end of the current transaction log.
    ra_locator move_truncpt
  3. Refresh the Replication Agent repository rather than overwriting it:
    ra_admin refresh
    Note: If you prefer to delete and replace all the information in the Replication Agent repository, issue the ra_admin deinit, force command followed by a normal ra_admin init command (without the force option).
  4. Reset the locator stored in Replication Server:
    isql -Usa -Psa_pass -SSAMPLE_RS
    connect
    go
    rs_zeroltm pds, pdb
    go
    exit
    go
    You see:
    Locator has been reset to zero.
    (return status = 0)
  5. Resume replication with the Replication Agent resume command:
    isql -Usa -Psa_pass -Smyra
    resume
    go