Resetting the Primary Microsoft SQL Server Database for Replication

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

  1. Protect your new environment from old log information by archiving all current redo log data. In the Replication Agent, run:
    ra_locator move_truncpt
  2. Reinitialize Replication Agent, which refreshes 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 ra_admin deinit, force followed by ra_admin init (without the force option).
  3. 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)