Resetting the Primary ASE Database For Replication

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

  1. Log in to Replication Server:
    isql –Usa –Psa_pass –SSAMPLE_RS
    If you did not set up the sample Replication Server instance, enter your Replication Server instance name instead of SAMPLE_RS.
  2. Connect to the primary database:
    1>connect to pds.pdb
    2>go
    
    where:
    • pds.pdb is the primary connection.

    • pds is the Adaptive Server data server of the primary connection.

    • pdb is the Adaptive Server database of the primary connection.

  3. Stop the Replication Agent instance:
    1>sp_stop_rep_agent pdb
    2>go
  4. Set the database to release the secondary truncation point:
    1>dbcc settrunc ('ltm','ignore')
    2>go
  5. Disconnect from the primary database:
    1>disconnect
    2>go
    
  6. Connect to the RSSD:
    1>connect to rssd
    2>go
  7. Reset the locator stored in Replication Server:
    1> rs_zeroltm pds, pdb
    1> go
    
  8. Disconnect from the RSSD:
    1>disconnect
    2>go
    
  9. Connect again to the primary database:
    1>connect to pds.pdb
    2>go
    
  10. Reset the truncation point to the end of the database transaction log:
    1>dbcc settrunc ('ltm','valid')
    2>go
  11. Start the Replication Agent instance:
    1>sp_start_rep_agent pdb
    2>go
  12. Disconnect from the primary database:
    1>disconnect
    2>go
    
  13. Verify that the Replication Agent instance has connected to Replication Server:
    1>admin who
    2>go
    If the Replication Agent instance has connected, Replication Server shows the connection status. For example:
    27 REP AGENT  Awaiting Command
          pds.pdb