After you complete the HDR configuration, you are ready to start HDR. This section describes the necessary steps for starting HDR.
Suppose you want to start HDR on two database servers, ServerA and ServerB. The procedure for starting HDR, using ServerA as the primary database server and ServerB as the secondary database server, is described in the following steps. Table 41 lists the commands required to perform each step and the messages sent to the message log. You can use ontape or ON–Bar to perform the backup and restore. You must use the same utility throughout the procedure.
If desired, you can also set up HDR using standard ON–Bar or ontape commands for external backup and restore.
If you are using:
When you issue an onmode -d command, the database server attempts to establish a connection with the other database server in the HDR pair and to start HDR operation. The attempt to establish a connection succeeds only if the other database server in the pair is already set to the correct type.
At this point, ServerB is not online and is not set to type secondary, so the HDR connection is not established.
ServerB tries to establish an HDR connection with the primary database server (ServerA) and start operation. The connection should be successfully established.
Before HDR begins, the secondary database server performs a logical recovery using the logical-log records written to the primary database server since step 2. If all these logical-log records still reside on the primary database server disk, the primary database server sends these records directly to the secondary database server over the network and logical recovery occurs automatically.
If you have backed up and freed logical-log files on the primary database server, the records in these files are no longer on disk. The secondary database server prompts you to recover these files from tape. In this case, you must perform step 6.
If the secondary database server must read the backed-up logical-log files over the network, set the tape device parameters on the secondary database server to a device on the computer that is running the primary database server or to a device at the same location as the primary database server.
After you recover all the logical-log files on tape, the logical restore completes using the logical-log files on the primary database server disk.
Step | On the Primary | On the Secondary |
---|---|---|
1. | Install UDRs, UDTs, and DataBlade modules.
Register UDRs, UDTs, and DataBlade modules. |
Install UDRs, UDTs, and DataBlade modules. |
2. | ontape command
ontape -s -L 0 ON–Bar command onbar -b -L 0 Messages to message log Level 0 archive started on rootdbs. Archive on rootdbs completed. |
|
3 | onmode command
onmode -d primary sec_name Messages to message log DR: new type = primary, secondary
DR: Trying to connect to secondary server DR: Cannot connect to secondary server |
|
4. | ontape command
ontape -p or ontape -r -p -e Answer no when you are prompted to back up the logs. ON–Bar command onbar -r -p or onbar -r -p -e Messages to message log IBM Informix Database Server Initialized -- Shared
Memory Initialized
|
|
5. | onmode command
onmode -d secondary prim_name Messages to message log DR: new type = secondary,
primary
If all the logical-log records written to the primary database server since step 1 still reside on the primary database server disk, the secondary database server reads these records to perform logical recovery. (Otherwise, step 5 must be performed). |
|
Messages to message log
DR:
Primary server connected
|
Messages to message log
DR:
Trying to connect to primary server
|
|
6. | ontape command
ontape -l ON–Bar command onbar -r -l |
|
Messages to message log
DR:
Primary server connected
|
Messages to message log
DR:
Secondary server connected
|