Switching to the Standby Database

Switch between the active and standby databases.

When you switch from the active database to the standby database, prevent client applications from executing transactions against or updating the active database during the switch. When the switch completes, clients can connect to the new active database to continue their work.

Determine whether a switch is necessary:
  • Do not switch if the active data server is experiencing a transient failure, which is a failure from which the Adaptive Server recovers when restarted, without additional recovery steps.

  • Do switch if the active database will be unavailable for a long period of time.

You must use the switch active command to switch the active and standby databases.

  1. On the Replication Server, use switch active to switch processing to the standby database.
  2. Monitor progress of the switch. The switch is complete when the standby connection is active and the previously active connection is suspended.
    1. On the Replication Server, check the logical status, using the admin_logical_status command.
    2. To follow the progress of the switch, check the last several entries in the Replication Server error log.
  3. Start the RepAgent for the new active database.
  4. Decide what you want to do with the old active database. You can:
    • Bring the database online as the new standby database, and resume connections so that Replication Server can apply new transactions,

    • Drop the database connection using the drop connection command. You can add it again later as the new standby database.

    • Create a new warm standby database connection for the new active database if the new standby database is not the original active database.

  5. Using isql, update a record in the new active database, and then check the update the new standby database.
Warm Standby System, After Switching
Figure 3-9 illustrates a warm standby system, after switching to the new active database in Boston. New York becomes the new warm standby. The database is replicated to Tokyo.