Switching to the standby database

If it becomes necessary to switch from the active database to the standby database, you need to take steps to prevent client applications from executing transactions against or updating the active database. After the switch is complete, clients can connect to the new active database to continue their work. See “Switching clients to the new database” for details.

Before switching to a standby database, you should determine whether a switch is necessary:

You must use the switch active command to switch the active and standby databases. The following procedure illustrates how to switch the warm standby system illustrated in Figure 3-8 from the active database to the standby database.

  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:

  5. Using isql, update a record in the new active database, and then check the update the new standby database.

Figure 3-9: 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.