Resynchronizing Directly from a Primary Database

Resynchronize a replicate database from a primary database.

  1. Stop replication processing by RepAgent. In Adaptive Server, execute:
    sp_stop_rep_agent database
  2. Suspend the Replication Server DSI connection to the replicate database:
    suspend connection to dataserver.database
  3. Instruct Replication Server to remove data from the replicate database outbound queue and wait for a resync marker from the primary database RepAgent:
    resume connection to data_server.database skip to 
    resync marker
  4. Instruct RepAgent to start in resync mode and send a resync marker to Replication Server:
    • If the truncation point has not been moved from its original position, in Adaptive Server execute:
      sp_start_rep_agent database, 'resync'
    • If the truncation point has been moved from its original position, in Adaptive Server execute:
      sp_start_rep_agent database, 'resync purge'
  5. In the Replication Server system log, verify that DSI has received and accepted the resync marker from RepAgent by looking for this message:
    DSI for data_server.database received and processed
    Resync Database Marker. Waiting for Dump Marker.
    Note: If you are resynchronizing multiple databases, verify that the DSI connection for each of the databases you want to resynchronize has accepted the resync marker.
  6. Obtain a dump of the primary database contents. See Adaptive Server Enterprise Reference Manual: Commands > Commands > dump database. Adaptive Server automatically generates a dump database marker.
  7. 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.

  8. Apply the dump of the primary database to the replicate database. See Adaptive Server Enterprise Reference Manual: Commands > Commands > load database.
  9. After you apply the dump to the replicate database, resume DSI:
    resume connection to data_server.database