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 avaiability.
The following sections describe how to upgrade your HADB installation:
Install new version of HADB.
Unregister your existing HADB installationas described in Unregistering HADB Packages
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 pacakge.
If neccessary, replace the management agent startup script.
For more information, see Replacing the Management Agent Startup Script
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 package is registered in the management domain, and 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 above 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 unregister 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.