IBM Support

75 ways to demystify DB2: # 35: Upgrading DB2 servers in an automated HADR environment

Technical Blog Post


Abstract

75 ways to demystify DB2: # 35: Upgrading DB2 servers in an automated HADR environment

Body

In an automated High Availability Disaster Recovery (HADR) environment, rolling upgrade procedure will not work when upgrading from an earlier to a later version of a DB2 database system. For example, you cannot use this procedure to upgrade from a DB2 Version 9.7 to Version 10.x. Use this procedure in an automated HADR environment when you upgrade your DB2 versions 10.1 and 10.5 from DB2 Version 9.7. The following steps must be completed:

  1. From CLP, as the instance owner, stop HADR on both standby and primary servers by using db2 stop hadr command. For example :

db2 stop hadr on database sample

  2. Verify the database role has been changed to standard on both servers using :

db2 get db cfg for sample | grep -i role

  3. Delete the cluster domain using db2haicu command. For example;

db2haicu -delete

  4. Deactivate the database on both the the standby and primary servers. For example

db2 deactivate db sample

  5. Stop DB2 instance by using db2stop command.
  6. As root, install DB2 V10.x in a new directory path.
  7. As root, upgrade the DB2 instance by using the db2iupgrade <inst_name> command. For example :

DB2DIR/instance/db2iupgrade db2inst1

      Where DB2DIR represents the installation location of the new release of the DB2 database system is installed.

  8. As the instance owner, start the DB2 instance by using the db2start command.
  9. As the instance owner, upgrade the database by using the db2 upgrade database command. For example :

db2 upgrade database sample
   

 10. Reinitialize HADR by following the steps documented on this link:

http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.1.0/com.ibm.db2.luw.admin.ha.doc/doc/t0011725.html

 11. Once the HADR has been reestablished, the cluster domain resources must be re-created. See the "Automated HADR configuration setup" whitepaper for  more information under the link: 

http://www.ibm.com/developerworks/data/library/long/dm-0907hadrdb2haicu/


Note : Deleting the cluster domain is an irreversible step.  Ensure that a snapshot of the resource model is captured via the lssam command before deleting the cluster domain. The resource model will need to be recreated once the DB2 upgrade has completed.
 

[{"Business Unit":{"code":"BU029","label":"Data and AI"}, "Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm13286899