Upgrading Db2 servers in a TSA automated HADR environment

Upgrade to Db2® version 11.5 in a TSA automated HADR environment from a previous Db2 Version.

Before you begin

  • Ensure that you have root access on Linux® and UNIX operating systems or Local Administrator authority on Windows.
  • Ensure that you have SYSADM authority.
  • Perform pre-upgrade tasks for Db2 servers

About this task

This topic will explain both upgrade options available to automated HADR environments.

Procedure

  1. Method 1: Upgrading the HADR primary and standby database while maintaining the HADR role and without reinitializing the HADR pair.
    1. Export the current TSAMP resource configuration via db2haicu -o command on primary and standby hosts. Delete the domain by using the db2haicu -delete command. Deleting the cluster domain is an irreversible step. The resource model can be re-created after the upgrade is complete using the db2haicu -f command to import the configuration. The XML file generated above can be used as the input file. If the export is run on a single host (either primary or standby) and the same XML file is used to recreate the resource model after the upgrade, then the localHost and remoteHost parameters of HADRDB element will need to be modified depending on the host where the import is being performed.
    2. Follow the procedure for Upgrading Db2 servers in HADR environments (without standby reinitialization).
  2. Method 2: Upgrading the HADR primary and standby database through re-initialization of the HADR pair.
    1. Stop HADR by running db2 stop hadr command on the database dbname.
    2. Delete the resources for the current instance by using the db2haicu -delete command. Deleting the cluster resources is an irreversible step. Before you do this, ensure that a snapshot of the resource model for the instance is captured by using the lssam command. The resource model needs to be re-created after the upgrade is complete.
    3. Deactivate the databases on both the primary and standby servers.
    4. Stop the Db2 instance by using db2stop command.
    5. Install Db2 version 11.5 in a new directory path.
    6. Upgrade the Db2 instance by using the db2iupgrade command.
    7. Start the Db2 instance by using the db2start command.
    8. If you are completing an upgrade on a primary server, upgrade the database by using the db2 upgrade dbname command.

What to do next