Sun GlassFish Enterprise Server v2.1.1 High Availability Administration Guide

Upgrading HADB

HADB is designed to provide “always on” service that is uninterrupted by upgrading the software. This section describes how to upgrade to a new version of HADB without taking the database offline or incurring any loss of availability. This is known as an online upgrade.

The following sections describe how to upgrade your HADB installation:

ProcedureTo upgrade HADB to a newer version

  1. Install new version of HADB.

  2. Register the new HADB version, as described in Registering HADB Packages

    Registering the HADB package in the HADB management domain makes it easy to upgrade or change HADB packages. The management agent keeps track of where the software packages are located, as well as the version information for the hosts in the domain. The default package name is a string starting with V and containing the version number of the hadbm program.

  3. Change the package the database uses.

    Enter the following command:


    hadbm set PackageName=package
    

    where package is the version number of the new HADB package.

  4. Un-register your existing HADB installation as described in Un-registering HADB Packages

  5. If necessary, replace the management agent startup script.

    For more information, see Replacing the Management Agent Startup Script

  6. Verify the results, as described in Verifying HADB Upgrade.

  7. (Optional) Remove the binary files for the old HADB version.

    After verifying that HADB has been upgraded properly, you can delete the old HADB packages.

Registering HADB Packages

Use the hadbm registerpackage command to register the HADB packages that are installed on the hosts in the management domain. HADB packages can also be registered when creating a database with hadbm create.

Before using the hadm registerpackage command, ensure that all management agents are configured and running on all the hosts in the hostlist, the management agent’s repository is available for updates, and no software package is already registered with the same package name.

The command syntax is:

hadbm registerpackage --packagepath=path [--hosts=hostlist] [--adminpassword=password | --adminpasswordfile=file] [--agent=maurl] [[package-name]]

The package-name operand is the name of the package.

The following table describes the special hadbm registerpackage command option. See Security Options and General Options for a description of other command options.

Table 2–1 hadbm registerpackage Options

Option 

Description 

--hosts=hostlist

-H 

List of hosts, either comma-separated or enclosed in double quotes and space separated. 

--packagepath=path

-L 

Path to the HADB software package. 

For example, the following command registers software package v4 on hosts host1, host2, and host3:

hadbm registerpackage 
--packagepath=hadb_install_dir/SUNWHadb/4.4 
--hosts=host1,host2,host3 v4

The response is:

Package successfully registered.

If you omit the --hosts option, the command registers the package on all enabled hosts in the domain.

Un-registering HADB Packages

Use the hadbm unregisterpackage command to remove HADB packages that are registered with the management domain.

Before using the hadbm unregisterpackage command, ensure that:

The command syntax is:

hadbm unregisterpackage  
--hosts=hostlist  
[--adminpassword=password | --adminpasswordfile= file]  
[--agent= maurl]  
[package-name ]

The package-name operand is the name of the package.

See Registering HADB Packages for a description of the --hosts option. If you omit the --hosts option, the hostlist defaults to the enabled hosts where the package is registered. See Security Options and General Options for a description of other command options.


Example 2–2 Example of un-registering HADB

To un-register software package v4 from specific hosts in the domain:

hadbm unregisterpackage --hosts=host1,host2,host3 v4

The response is:

Package successfully unregistered.


Replacing the Management Agent Startup Script

When you install a new version of HADB, you may need to replace the management agent startup script in /etc/init.d/ma-initd. Check the contents of the file, HADB_install_dir/lib/ma-initd. If it is different from the old ma-initd file, replace the old file with the new file.

ProcedureVerifying HADB Upgrade

Follow this procedure to verify that HADB has been properly upgraded:

  1. Confirm the version of the running HADB processes.

    Enter the following commands on all HADB nodes to display the HADB version:

    new-path/bin/ma -v

    new-path/bin/hadbm -v

    where new-path is the path to the new HADB installation.

    The results should show the new HADB version number.

  2. Confirm the database is running.

    Enter this command:

    new-path/bin/hadbm status -n

    If the upgrade is successful, the results will show all the HADB nodes in running state.

  3. Ensure that products using HADB have changed their configuration settings to the new HADB path.

  4. Run any upgrade tests for the products using HADB.