Restart if the primary server fails

The process for restarting an HDR or RS cluster after the primary server fails depends on whether a secondary server became the primary server, and the method by which the secondary server became the primary server.

The secondary database server was not changed to a standard database server

If you must restart an HDR or RS cluster after a failure of the primary database server if the secondary database server is not changed to standard, start the primary database server by using the oninit command.

The secondary database server was changed to a standard database server manually

If you must restart an HDR or RS cluster after a failure of the primary database server, and you have manually changed the secondary database server to be a standard database server, complete the steps in the following table.
Table 1. Steps to restart if you changed the secondary database server to standard
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.

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

The secondary database server was changed to a standard database server automatically

If you must restart an HDR or RS cluster after a failure of the primary database server, and the secondary database server was automatically changed to a standard database server, complete the steps shown in the following table.
Table 2. Steps to restart if you changed the secondary database server to standard automatically
Step On the primary database server On the secondary database server
1. % oninit

If DRAUTO = 1, the type of this database server is set to primary.

If DRAUTO = 2, the type of this database server is 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:
  • Set the logical-log tape device to a device on the computer running the secondary database server.

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.

If DRAUTO = 2, the secondary database server switches automatically to primary. 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