Resynchronizing Directly from a Primary Database

Resynchronize a replicate database from a primary database.

  1. To move the truncation point, execute:
    ra_locator move_truncpt
    ra_admin refresh
    isql -USAMPLE_RS_RSSD_prim -PSAMPLE_RS_RSSD_prim_ps
    -SSAMPLE_RS_ERSSD -DSAMPLE_RS_ERSSD
    rs_zeroltm NY, NYora92
    go

    If the truncation point is not changed, proceed to step 2.

  2. Stop replication processing by Replication Agent. In Replication Agent, execute:
    suspend
  3. Suspend the Replication Server DSI connection to the replicate database:
    suspend connection to dataserver.database
  4. Instruct Replication Server to remove data from the replicate database outbound queue and wait for a resync marker from the primary database Replication Agent:
    resume connection to data_server.database skip to 
    resync marker
  5. Obtain a dump of the primary database contents following the instructions in your database documentation.
  6. If you use the Recovery Manager (RMAN) for Oracle, use the Oracle list backup command to obtain the last System Change Number (SCN) of the RMAN backup. Then, in Replication Agent, set this SCN as the value of lr_dump_marker:
    lr_dump_marker oracle scn
  7. Start your Replication Agent in resync mode and send a resync marker to Replication Server:
    resume resync
    go
  8. In the Replication Server system log, verify that DSI has received and accepted the resync marker from Replication Agent by looking for this message:
    DSI for data_server.database received and processed
    Resync Database Marker. Waiting for Dump Marker.

    After DSI processes the resync marker for the replicate database, you can apply the dump to the replicate database.

    Note: If you are resynchronizing multiple databases, verify that the DSI connection for each database you are resynchronizing has accepted the resync marker.
  9. Apply the dump of the primary database to the replicate database following the instructions in your database documentation.
  10. Verify that Replication Server has processed the dump database marker by looking for this message in the Replication Server system log:
    DSI for data_server.database received and processed
    Dump Marker. DSI is now suspended. Resume after database has been reloaded.

    When Replication Server receives the dump marker, the DSI connection automatically suspends.

  11. If the maintenance and DDL users do not exist in the primary database, add these users to the replicate database after you apply the dump from the primary database.
  12. Run the hds_oracle_new_setup_for_replicate.sql script on the replicate database to add the rs_info and rs_lastcommit tables to the replicate database.
    The script also inserts relevant values and grants the required permissions in the replicate database.
  13. After you apply the dump to the replicate database, resume DSI using:
    resume connection to data_server.database