Home | Previous Page | Next Page   Fault Tolerance > Using High-Availability Data Replication (Enterprise/Workgroup Editions) >

Starting HDR for the First Time

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.

Important:
If you use ON–Bar to perform the backup and restore, ontape is required on both database servers. You cannot remove ontape from database servers participating in HDR.

If desired, you can also set up HDR using standard ON–Bar or ontape commands for external backup and restore.

To start HDR
  1. Install user-defined types, user-defined routines, and DataBlade modules on both database servers, and then register them on ServerA only.
  2. Create a level-0 backup of ServerA.
  3. Perform a physical restore of ServerB from the level-0 backup that you created in step 1. Do not perform a logical restore.

    If you are using:

    • ON–Bar, use the onbar -r -p command to perform a physical restore.
    • ON–Bar and performing an external restore, use the onbar -r -p -e command to perform the physical restore.
    • ontape, use the ontape -p option. You cannot use the ontape -r option because it performs both a physical and a logical restore.
    • ontape and performing an external restore, use the ontape -p -e command to perform the physical restore.
  4. Use the onmode -d command to set the type of ServerA to primary and to indicate the name of the associated secondary database server (in this case ServerB).

    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.

  5. Use the onmode -d command to set the type of ServerB to secondary and indicate the associated primary database server.

    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.

    Important:
    You must complete steps 3 and 5 together. If you need to shut down and restart the secondary database server after step 3, you must redo step 3.
  6. If logical-log records that were written to the primary database server are no longer on the primary disk, the secondary database server prompts you to recover these files from tape backups.

    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.

Table 41. Steps to Start HDR for the First Time
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
server name = sec_name

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
Recovery Mode
Physical restore of rootdbs started.
Physical restore of rootdbs completed.

5. onmode command

onmode -d secondary prim_name

Messages to message log

DR: new type = secondary, primary
server name = prim_name

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
DR: Primary server operational

Messages to message log

DR: Trying to connect to primary server
DR: Secondary server connected
DR: Failure recovery from disk in process.
n recovery worker threads will be started.
Logical Recovery Started
Start Logical Recovery - Start Log n, End Log?
Starting Log Position - n 0xnnnnnDR: Secondary server operational

6. ontape command

ontape -l

ON–Bar command

onbar -r -l

Messages to message log

DR: Primary server connected
DR: Primary server operational

Messages to message log

DR: Secondary server connected
DR: Failure recovery from disk in process.
n recovery worker threads will be started.
Logical Recovery Started
Start Logical Recovery - Start Log n, End Log?
Starting Log Position - n 0xnnnnn
DR: Secondary server operational

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]