If no damage occurred to critical data on either database server, the following four scenarios, each requiring different procedures for restarting HDR, are possible:
After a network failure, the primary database server is in online mode, and the secondary database server is in read-only mode. HDR is turned off on both database servers (state = off). When the connection is reestablished, you can restart HDR by issuing onmode -d secondary primary_name on the secondary database server. Restarting HDR might not be necessary because the primary database server attempts to reconnect every 10 seconds and displays a message regarding the inability to connect every 2 minutes. You do not have to use onmode restart the connection.
If you need to restart HDR after a failure of the secondary database server, complete the steps in Table 47. The steps assume that you have been backing up logical-log files on the primary database server as necessary since the failure of the secondary database server.
The following sections describe how to restart HDR if the primary database server fails under various circumstances.
If you need to restart HDR after a failure of the primary database server if the secondary database server is not changed to standard, simply bring the primary database server back online using oninit.
If you need to restart HDR after a failure of the primary database server, and you have changed the secondary database server to be a standard database server, complete the steps in Table 49.
Step | On the Primary Database Server | On the Secondary Database Server |
---|---|---|
1. | onmode -s
This step takes the secondary database server (now standard) to quiescent mode. All clients that are connected to this database server must disconnect. Applications that perform updates must be redirected to the primary. See Redirection and Connectivity for Data-Replication Clients. |
|
2. | onmode -d secondary prim_name | |
3. | oninit
If all the logical-log records that were written to the secondary database server are still on the secondary database server disk, the primary database server recovers these records from that disk when you issue the oninit command. If you have backed up and freed the logical-log files on the secondary, the records in these files are no longer on disk. In this case, you are prompted to recover these logical-log files from tape (step 4). For ontape users: If you want to read the logical-log records over the network, set the logical-log tape device to a device on the computer that is running the secondary database server. |
|
4. | If you are prompted to recover logical-log records from
tape, perform this step.
ontape command ontape -l ON–Bar command onbar -r -l |
If you need to restart HDR after a failure of the primary database server, and the secondary database server was automatically changed to a standard database server (as described in Automatic Switchover), complete the steps shown in the following table.
Step | On the Primary Database Server | On the Secondary Database Server |
---|---|---|
1. |
% oninit If DRAUTO = 1, the type of this database server will be set to primary. If DRAUTO = 2, the type of this database server will be set to secondary when it is restarted. If all the logical-log records that were written to the secondary database server are still on the secondary database server disk, the primary database server recovers these records from that disk when you issue the oninit command. If logical-log files that you have backed up and freed are on the secondary database server, the records in these files are no longer on disk. In this case, you are prompted to recover these logical-log files from tape (step 2). For ontape users:
|
If DRAUTO = 1, the secondary database server automatically goes through graceful shutdown when you bring the primary back up. This ensures that all clients are disconnected. The type is then switched back to secondary. Any applications that perform updates must be redirected back to the primary database server. See Redirection and Connectivity for Data-Replication Clients. If DRAUTO = 2, the secondary database server switches to primary and then automatically to standard. The old primary database server becomes a secondary database server after it restarts and connects to the other server and determines that it is now a primary database server. |
2. |
If you are prompted to recover logical-log records from tape, perform this step. ontape command % ontape -l ON–Bar command onbar -r -l |