Reset the primary ASE database for replication

In a test environment, there may be times when the replication environment should be reset. Instead of deleting and re-creating a new Mirror Replication Agent instance, use this procedure to easily reset the environment.

StepsResetting the primary ASE database for replication

  1. Use isql to log in to Mirror Replication Agent:

    isql –Usa –P –Smyma
    
  2. To detect an error that occurred after replication start-up, execute the ra_status command:

    ra_status
    
    go
    
  3. Suspend Mirror Replication Agent:

    suspend
    
    go
    
  4. Protect your new environment from old log information by using this command in the Mirror Replication Agent to move the transaction log truncation point to the end of the log:

    pdb_init move_truncpt
    
    go
    
  5. You can retain marking and log device information by re-initializing the Mirror Replication Agent using ra_init with the force option. This forces the Mirror Replication Agent repository to be refreshed instead of overwritten. Before and after invoking ra_init, quiesce and resume the primary database with the pdb_quiesce command:

    pdb_quiesce hold
    
    go
    
    ra_init force
    
    go
    
    pdb_quiesce release
    
    go
    

    NoteIf you prefer to delete and replace all the information in the Mirror Replication Agent repository, issue the ra_deinit command followed by a normal ra_init command (without the force option):

    See the Mirror Replication Agent Reference Manual.

  6. Reset the locator stored in Replication Server:

    isql -USAMPLE_RS_RSSD_prim -PSAMPLE_RS_RSSD_prim_ps -SSAMPLE_RS_ERSSD -DSAMPLE_RS_ERSSD
    
    rs_zeroltm pdb1
    
    go
    

    This message appears:

    Locator has been reset to zero.
    
    (return status = 0)