Hitachi

Hitachi Advanced Database Setup and Operation Guide


8.7.1 Using a backup of the previous version of the database

This subsection explains how to downgrade the HADB server version by using a backup of the previous version of the database. This method assumes that you have acquired a full backup of the previous version of the database prior to performing a version upgrade.

Note

If you have not acquired a full backup of the previous version of the database, you will have to use the previous version to rebuild the database and then perform version downgrading. For details, see 8.7.2 Rebuilding the database by using the previous version.

Organization of this subsection

(1) Tasks prior to version downgrading

Before you downgrade the HADB server version, make sure that the following tasks have been completed.

(a) Confirming the HADB server's environment settings

Before you downgrade the HADB server version, check that the values of environment variables, kernel parameters, and various server definition operands were not changed during the version upgrade processing. If any of these values were changed, you must restore the values that were being used by the previous version.

(b) Stopping application programs and commands

Before you downgrade the HADB server version, terminate any application programs and commands that are executing.

(c) Terminating the HADB server normally

Before downgrading the HADB server version, use the adbstop command to terminate the HADB server normally.

If the HADB server has already stopped, use the following procedure to confirm that it terminated normally:

Procedure

  1. Execute the adbls -d srv command.

    Confirm that the HADB server's status, which is output to the STATUS output item, is STOP.

    If it is STOP, proceed to step 2 or 3.

  2. Check the server message log file.

    Open the server message log file ($ADBDIR/spool/adbmessageXX.log#) and confirm that the termination mode reported in the KFAA91154-I message was normally.

    #

    XX is a sequential number between 01 and 04.

  3. Check syslog.

    Open syslog and confirm that the termination mode reported in the KFAA91154-I message was normally.

If the result in step 1 is STOP and the result in step 2 or 3 is normally, the HADB server has terminated normally.

If the HADB server did not terminate normally, use the adbstart command to start it, and then use the adbstop command to terminate it normally.

Multi-node function

If the HADB server in the multi-node configuration has not terminated normally, start the HADB servers on all nodes and then terminate the HADB servers on all nodes normally. In this case, there is no need to terminate HA Monitor (no need to execute the monstop command).

For details about how to start the HADB server in a multi-node configuration and how to terminate it normally, see 16.4.1 Starting the HADB servers in the multi-node configuration and 16.4.2 Terminating HADB servers in the multi-node configuration.

Cold standby configuration

If the HADB server in a cold standby configuration has not terminated normally, start all HADB servers on all hosts, and then terminate all of them normally. In this case, there is no need to terminate HA Monitor (no need to execute the monstop command).

For details about how to start the HADB server in a cold standby configuration and how to terminate it normally, see 17.4.1 How to start the cold standby configuration and 17.4.2 How to terminate the cold standby configuration.

(d) Backing up the server directory

Before downgrading the HADB server version, you also need to back up the server directory.

Before you downgrade the HADB server version, delete the server directory, because the HADB server needs to be uninstalled. When the server directory is deleted, files such as definition files and message log files are also deleted. Make a backup of the server directory in case these files are needed after version downgrade.

For details about the procedure for acquiring a backup of the server directory, see (2) Backup procedure in 10.3.1 Backup acquisition method.

(2) Downgrading the version

The procedure below explains how to downgrade the HADB server version.

Multi-node function

If you are using the multi-node function, perform this step on all HADB servers on all nodes.

Cold standby configuration

If you are using a cold standby configuration, perform this step on all HADB servers on all hosts.

Procedure

  1. Uninstall the HADB server.

    Uninstall the HADB server as explained in 8.12 Uninstallation.

  2. Install the previous version of the HADB server.

    Install the previous version of the HADB server. For details about how to install the HADB server, see 8.2 Installing the HADB server.

  3. Recover the database from its backup.

    Recover the database from the backup you made earlier.

    For details about how to recover the database from a backup, see 10.3.2 Recovering the database from the backup.

    If you are using the multi-node function, see 16.8.2 Recovering a database from a backup. If HADB server is in a cold standby configuration, see 17.6.2 Recovering a database from a backup.

  4. Configure an environment for the HADB server.

    Configure an environment for the previous version of the HADB server. For environment variables, kernel parameters, and server definition operands, specify the same values as were in effect for the previous version.

  5. Start the HADB server.

    Use the adbstart command to start the HADB server.

    If you acquired the backup in the quiescence mode, you will have to set the HADB server operation mode to normal after the HADB server has started. To do this, use the adbchgsrvmode command to change the mode to normal.

Important

When the HADB server version is downgraded by using a backup of the previous version of the database, the contents of the database are restored to the point at which the backup was acquired.

(3) Tasks after a version downgrade

Once you have downgraded the HADB server version, you must also downgrade the HADB client versions (to match the version of the HADB server).

For details about how to downgrade HADB client versions, see Downgrading an HADB client version (restoring the previous version) in the HADB Application Development Guide.