Switching the Active and Standby Databases

Learn the procedure to switch the active and standby databases for a logical connection.

Prerequisites

Before switching, you must set up clients to work with the active data server.

Task
  1. At the Adaptive Server of the active database, ensure that the RepAgent is shut down. Otherwise, use sp_stop_rep_agent to shut down the RepAgent.
  2. Execute the switch active command at the Replication Server.
    Enter:
    switch active for logical_ds.logical_db
    to data_server.database
    data_server.database is the new active database.
  3. Use admin logical_status to monitor the progress of a switch.
    Enter:
    admin logical_status, logical_ds, logical_db
    See the Operation in Progress and State of Operation in Progress output columns for the switch status.
  4. When the active database switch is complete, you must restart RepAgent for the new active database.
    Enter:
    sp_start_rep_agent dbname
Next
Note: If Replication Server stops in the middle of switching, the switch resumes after you restart Replication Server.
Related concepts
Set up Clients to Work with the Active Data Server
Internal Switching Steps