Resynchronizing Both the Primary and Replicate Databases from the Same Dump

Coordinate resynchronization to reload both the primary database and replicate database from the same dump or copy of data. No dump database marker is needed, since you are not obtaining a dump from the primary database.

  1. Stop replication processing by RepAgent. Do not alter the truncation point.
    In Adaptive Server, execute:
    sp_stop_rep_agent database
  2. Suspend the Replication Server DSI connection to the replicate database:
    suspend connection to data_server.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. Obtain the RepAgent settings before you apply the dump.
    Note: Adaptive Server stores, within the database, the connectivity settings and other configurations that RepAgent uses. If you load the primary database from a dump that you took from a different database, RepAgent loses its configuration settings, or the settings change to match the settings of the database from which you took the dump.
  5. Apply the dump of the data from the external source to the primary database.
    After you apply the dump, reset the RepAgent configurations to the settings that existed before you applied the dump.
  6. Make sure that the last primary database transaction log page does not contain any operation that can affect replicate database tables by executing at the primary Adaptive Server database:
    rs_update_lastcommit 0, 0, 0, ""
    go 100
  7. Move the truncation point to the end of the transaction log for the primary database. In Adaptive Server, execute:
    dbcc settrunc(‘ltm’, ‘end’)
    go
  8. Instruct RepAgent to start in resync mode with the init instruction. In Adaptive Server, execute:
    sp_start_rep_agent database, 'resync init'
  9. Verify that DSI has received and accepted the resync marker from the RepAgent by looking for this message in the Replication Server system log:
    DSI for data_server.database received and processed
    Resync Database Marker. DSI is now suspended. Resume 
    after database has been reloaded.

    When Replication Server receives and processes the resync database with init marker, the DSI connection suspends.

  10. Apply the dump of the data from the external source to the replicate database.
  11. After you apply the dump to the replicate database, resume DSI to the replicate database to allow Replication Server to apply transactions from the primary database:
    resume connection to data_server.database