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:
Install new version of HADB.
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.
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.
Un-register your existing HADB installation as described in Un-registering HADB Packages
If necessary, replace the management agent startup script.
For more information, see Replacing the Management Agent Startup Script
Verify the results, as described in Verifying HADB Upgrade.
(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.
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.Table 2–1 hadbm registerpackage Options
List of hosts, either comma-separated or enclosed in double quotes and space separated.
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.
Use the hadbm unregisterpackage command to remove HADB packages that are registered with the management domain.
Before using the hadbm unregisterpackage 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.
The new HADB package is registered in the management domain
No existing databases are configured to run on the package about to be unregistered.
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.
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.
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.
Follow this procedure to verify that HADB has been properly upgraded:
Confirm the version of the running HADB processes.
Enter the following commands on all HADB nodes to display the HADB version:
where new-path is the path to the new HADB installation.
The results should show the new HADB version number.
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.
Ensure that products using HADB have changed their configuration settings to the new HADB path.
Run any upgrade tests for the products using HADB.