IBM Support

Upgrade guide for DB2 Servers in HACMP Environments

Preventive Service Planning


Abstract

If your Db2 server is configured in a HACMP environment and you plan to upgrade the server, refer to this guide.

Content

Db2 servers can be configured to make use of the High Availability Cluster Multi-Processing (HACMP™) strategy to help ensure high availability. Upgrading your Db2 servers in this environment is similar to any other Db2 server upgrade, with minor differences that you should be aware of.


Assumptions:
  • Two node HACMP cluster
  • Db2 instances and databases located on shared disks
  • Each node contains its own locally installed Db2 server product. (Note: You must have the exact same install path on both nodes)

High level overview of the steps:

1. Stop HACMP on both the active and standby nodes.
2a. For major releases, upgrade your Db2 server on the active node only, as per the standard documentation found in the IBM Documentation OR
2b. Alternatively, for mod pack or fix pack releases, update your Db2 server via fix pack update, as per the standard documentation found in the IBM Documentation
3. Install the sample HACMP scripts on both the active and standby nodes.
4. Startup your HACMP environment.
5. Perform post-upgrade verification steps.

Example
Upgrading from Db2 UDB Version 9.7 to Db2 for LUW Version 10.1 (or higher), running HACMP for AIX cluster managing software with two nodes; active and standby. Here are the steps you would follow:

1) Stop HACMP on both nodes
Stop the HACMP environment on both the active and standby server:

smitty hacmp → System Management → Manage HACMP services → Stop Cluster Services

2) To upgrade your server to the next major release follow step a (for example, v11.1 -> v11.5). If you are updating to the next mod pack or the next fix pack within the same major release follow step b (for example, v11.5.6 -> v11.5.8).

a) Upgrade your Db2 Server to the next major release
Perform the Db2 server upgrade on your active node only. Refer to the "Upgrading a Db2 server (Linux and UNIX)" page of the IBM Documentation for the Db2 version you are upgrading to for upgrade instructions. Follow all the necessary steps including: pre-upgrade steps, upgrading the Db2 server itself and performing post-upgrade steps.
2b) Update your Db2 Server to the next mod pack or fix pack
Perform the fix pack update on each host as documented in the IBM Documentation. Refer to "Installing offline fix pack updates to existing Db2 database products (Linux® and UNIX)" for the Db2 version you are updating. Follow all the necessary steps including all tasks to prepare for the fix pack update, the fix pack update itself, as well post-installation tasks for fix packs.

3) Install sample HACMP scripts (Optional)
Install the sample HACMP scripts provided in the Db2 instance you have just upgraded on both the active and standby nodes.

These scripts can be found in the <INSTANCE_HOME>/sqllib/samples/es path. This step will install those scripts to the default installation location, /usr/bin. You should check if there are already HACMP scripts installed in your environment and if they have been customized. If they have been customized, do not install new scripts as this would overwrite the customization.

As an example, installing sample HACMP scripts includes the following steps:

1. Go to <INSTANCE_HOME>sqllib/samples/es path
2. Locate the following three files:
  • rc.db2pe.eee (DPF) or rc.db2pe.ee (non-DPF)
  • db2_proc_restart.eee (DPF) or db2_proc_restart.ee (non-DPF)
  • db2_inst_ha.local
3. Copy rc.db2pe.eee/ee to rc.db2pe
4. Copy db2_proc_restart.eee/ee to db2_proc_restart
5. Use db2_inst_ha.local to install the HACMP scripts (run once for each clustered database).
  • db2_inst_ha.local <hostname> . <database_name>
Where:
  • hostname is the host of the node
  • . is the current directory
  • database_name is the database name


4) Start up your HACMP environment
As root, run the following command on both active and standby nodes:

Smitty hacmp → System Management → Manage HACMP services → Start Cluster Services


5) Post-upgrade/update verification
After the Db2 server environment has been upgraded and the HACMP services have been restarted on both nodes, verify that the Db2 server and your HACMP services are running correctly.

Refer to the IBM Documentation for post-upgrade verification steps.

To verify your HACMP services, some basic steps include:
  • Run 'clstat' on both active and standby nodes to verify the cluster is back online.
  • Perform a failover test, i.e. as root run:
Smitty hacmp → System Management → Manage HACMP services → Stop Cluster Services (select action, "Move Resource Groups")
 
  • Analyze /var/hacmp/logs/hacmp.out log file to make sure everything is setup as expected.

Refer to IBM Documentation on HACMP for further details on how you can best validate that your environment is ready.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"High Availability - Cluster Management","Platform":[{"code":"PF002","label":"AIX"}],"Version":"9.7;10.1;10.5;11.1","Edition":"Advanced Enterprise Server;Advanced Workgroup Server;Enterprise Server;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
07 November 2022

UID

swg21461186