IBM Support

Procedure to install a DB2 special build or fix pack on an IBM Smart Analytics System

Question & Answer


Question

How do I manually install a DB2 special build or DB2 fix pack on an IBM Smart Analytics System?

Answer

If your system is installed with the IBM Smart Analytics System Control Console software, use an IBM Smart Analytics System fix pack available on Fix Central to update your software stack. If the DB2 fix you need is not available in an IBM Smart Analytics System fix pack or your system does not have the control console software installed, use the instructions in this document to manually install a DB2 special build or DB2 fix pack on your IBM Smart Analytics System.


Before you begin
This document uses the following variables. Substitute the appropriate values for your environment.

Variable nameExample name to useNotes
MGMT, ADMIN, ADMIN_ALL, DATA, STANDBY
These variables refer to the role of the different servers. Replace each variable with the appropriate host names from your environment.
  • MGMT = management node used to manage all nodes in the cluster.
  • ADMIN = administration node or NODE0000 or primary coordinator node.
  • ADMIN_ALL = all coordinator nodes
  • DATA = all data nodes in the core warehouse
  • STANDBY = all standby nodes the core warehouse
BCU_share
  • All AIX systems: /BCU_share
  • 5600 systems: /BCU_share
  • D5000 and D5100: /csminstall

install_path
  • AIX systems: /usr
  • Linux systems: /opt
The installation path is operating-system dependent. You can use the db2level command to validate the current installation path.
hostnamebcudata001Use the appropriate server host name.
date20110801Use the format YYYYMMDD, where YYYY represents a 4-digit year, MM represents a 2-digit month, and DD represents a 2-digit month.
new_path_to_fixpackDB2_97fp1Use a name that clearly labels the directory with the product, version, and build number (if you are applying a special build). If you need to install the product in the future, this naming convention will allow you to easily identify the product and correct version to install.
nlpack_pathNLPack_97fp1Use a name that clearly identifies the national language pack content and the version contained in the directory.
instance_userdb2inst1The name of the DB2 instance owner.
fenced_userdb2fenc1The name of the DB2 fenced user. You can find the fenced user name and group by looking at the owner and group of the following file:
ls -l ~<instance_user>/sqllib/adm/.fenced

Note: You can use any utility you prefer to issue remote commands to the servers in the cluster. If you choose not to use a remote command utility, you can log on to each server and run the commands locally.

Procedure
1. Mount the installation media directory from the management node
    a. If the installation media directory is not already mounted from the management node, mount it using the command that is appropriate for your system.
    • For IBM Smart Analytics System 7600 or 7700, Balanced Warehouse E7100, or IBM Smart Analytics System 5600 environments, issue the following command as root on ADMIN_ALL, DATA, and STANDBY nodes:
      • mount /BCU_share

    • For Balanced Warehouse D5000 or D5100 environments, issue the following command as root on ADMIN_ALL, DATA, and STANDBY nodes:
      • mount /csminstall
      Note: In newer configurations, the /BCU_share directory has replaced the /csminstall directory. If you mounted the /csminstall directory, substitute /csminstall for /BCU_share as you follow the instructions in this document. Alternatively, you can create a symbolic link.

    b. For D5000 and D5100 environments only, you can optionally create a symbolic link. Issue the following command as root on MGMT, ADMIN_ALL, DATA, and STANDBY nodes:
      ln -s /csminstall /BCU_share

    c. Create subdirectories in the /BCU_share directory on the management node to hold a copy of the downloaded files. You can name the directories anything that helps you remember what is stored there. These directories will act as a repository to hold installation images in case they are needed in the future. In the remainder of this document, the new directory for the DB2 fix pack is referenced as the "<new_path_to_fixpack>" variable and the new directory for the national language pack (NLPack) is referenced as the "<nlpack_path>" variable.

2. Download the necessary files
    a. Download the appropriate version of the universal build.
    • If you are applying a special build, your technical support engineer will provide you with the correct download instructions.
    • If you are applying a generally available DB2 fix pack, download the universal build (called the DB2 Universal Fix Pack or DB2 Universal Build) from the following Fix Central page:

    • http://www.ibm.com/support/docview.wss?uid=swg27007053

    b. Download the appropriate national language pack (NLPack) from the Fix Central page listed in step 2a.
      Verify that the version of the NLPack you download matches the version of the special build or the fix pack you downloaded in step 2a.

    c. Copy the universal build and NLPack files to the directories you created in the /BCU_share directory in step 1c. Copy the universal build file to the directory specified by the "<new_path_to_fixpack>" variable and the NLPack file to the directory specified by the "<nlpack_path>" variable.

    d. Extract and untar the files you downloaded. Run the following commands on the MGMT node:
      • uncompress <filename> or gunzip <filename>
      • tar xvf <filename>.tar

3. Copy the contents of the SApolicy directory
    You must copy the SApolicy scripts before applying a fix pack or special build. The DB2 fix pack installation will overwrite the SApolicy scripts, so you must restore the original SApolicy scripts after the installation. The SApolicy scripts are the same on the ADMIN_ALL, DATA, and STANDBY nodes.

    To copy the files on the administration node to a backup archive, perform the following steps:
    a. Log in as root on the ADMIN node.

    b. Change to the following directory:
      cd /usr/sbin/rsct/sapolicies/db2/
    c. Create a tar file:
      tar cvf /BCU_share/sapolicies.save.tar *

4. Disable high availability (HA) if it is enabled
    You will need to disable both RSCT (Reliable Scaleable Cluster Technology) and Tivoli SAMP (Systems Automation for Multiplatforms) to disable high availability. When you disable HA, it will prevent an automated failover from occurring.
    a. Change Tivoli SAMP to run in manual mode. Issue the following command as root on the ADMIN node:
      samctrl -M T

    b. Change the critical resource protection method so that RSCT will not reboot a node if a communication issue affects the cluster. Issue the following command as root on the ADMIN node:
      chrsrc -c IBM.PeerNode CritRsrcProtMethod=5


5. Stop the instance
    a. As the instance user on the ADMIN node, run the following command:
      db2stop force

    b. Verify that all DB2 processes have stopped cleanly.
      ps -ef | grep db2

    If there are db2 processes running, issue the following command as the instance user to stop them:
      db2_kill

    c. Use the DB2 Fault Monitor Controller Utility (FMCU) to prevent the fault monitor from being launched on any node You must run the db2fmcu command as the root user because it accesses the inittab file on each node. Issue the following command as the root user on the ADMIN_ALL, DATA, and STANDBY nodes:
      /<install_path>/IBM/dwe/db2/V9.7/bin/db2fmcu -d

    d. If the fault monitor is running on any of the ADMIN_ALL, DATA, or STANDBY nodes, issue the following command on each node to stop the monitor from running:
      /<install_path>/IBM/dwe/db2/V9.7/bin/db2fm -i <instance_name> -D

6. Install the fix pack or special build and update the instance

Note: The "-f NOTSAMP" option specifies that Tivoli SAMP or RSCT are not updated as part of the DB2 installation process. For fix packs 3a and higher, Tivoli SAMP and RSCT are updated by default, and will cause the scripts in /usr/sbin/rsct/sapolicies/db2/ to be overwritten. Use the following steps to install maintain the same Tivoli SAMP and RSCT version and to keep the SApolicy scripts from being overwritten.

    a. Install the fix pack or special build by issuing the following command as root on ADMIN_ALL, DATA, and STANDBY nodes:
      /BCU_share/<new_path_to_fixpack>/installFixPack -b /<install_path>/IBM/dwe/db2/V9.7 -c /BCU_share/<nlpack_path> -f NOTSAMP -f install > /tmp/update_<hostname>_<date>.log

    b. Verify that the installation was successful.
      grep execution /tmp/update_<hostname>_<date>.log
      For each node you should see the following text:
      <hostname>: The execution completed successfully.

    c. Update the instance.
      As the root user on the ADMIN node, issue the following commands:
      cd /<install_path>/IBM/dwe/db2/V9.7/instance
      ./db2iupdt -u <fenced_user> <instance_user>

    d. Use the DB2 Fault Monitor Controller Utility (FMCU) to prevent the fault monitor from being launched on any node. You must run the db2fmcu command as the root user because it accesses the inittab file on each node. Issue the following command as the root user on the ADMIN_ALL, DATA, and STANDBY nodes:
      /<install_path>/IBM/dwe/db2/V9.7/bin/db2fmcu -d
      e. Update the DB2 Registry to your new version. Issue the following command as root on ADMIN_ALL, DATA, and STANDBY nodes:
        i) To remove the instance record which refers to the old DB2 path, issue
          /<install_path>/IBM/dwe/db2/V9.7/bin/db2greg -delinstrec instancename=<instance_user>
        ii) Add the instance record which refers to the new DB2 path, issue
          /<install_path>/IBM/dwe/db2/V9.7/instance/db2iset -a <instance_user>

      f. Verify that all nodes including the standby nodes have been updated. As the instance user on the ADMIN node, issue the following command:
        rah db2level

      g. As the instance user on the ADMIN node, issue the following command
        db2start

      h. Optionally, you can perform one or more of the following procedures to verify that the database is operational after the update.
        • Verify that users can connect to all nodes
        • Activate the database or follow your normal procedures to release the system to the user community
        • Run the SELECT command against a partitioned table

      i. Optionally, you can also bind the bind files. Binding of the database utilities and the DB2 CLI bind files occurs automatically. However, if an error occurs, you can manually bind the database utilities and the DB2 CLI bind files. Refer to following topic in the DB2 Information Center: Binding bind files after installing fix packs

      j. Optionally, you can also update the system catalogs by running the db2updv97 command. However, after you run the db2updv97 command you cannot easily revert the update, and you will not be able to use the backout procedure included in the instructions below. Therefore, it is recommended that you run the db2updv97 command only after you have completed any acceptance testing intended for the update or fix pack.

      If you have already run the db2updv97 command and want to revert to a previous version, you will need to restore from a backup image that was taken before the db2updv97 command was run. Refer to the db2updv97 - Update database to Version 9.7 fix pack command topic in the DB2 Information Center..


    7. Restore the SApolicy scripts
      After you install the special build or fix pack verify that the scripts in /usr/sbin/rsct/sapolicies/db2/ are replaced with the scripts you copied in step 3.

      a. Log in as the root user on the ADMIN_ALL, DATA, and STANDBY nodes.

      b. Change to the following directory:
        cd /usr/sbin/rsct/sapolicies/db2/

      c. Extract the tar file you created in step 3:
        tar xvf /BCU_share/sapolicies.save.tar

    8. Enable high availability (HA) if required
      a. Change the critical resource protection method to the default value. Issue the following command as root on the ADMIN node:
        chrsrc -c IBM.PeerNode CritRsrcProtMethod=1

      b. Change Tivoli SAMP to run in automated mode. Issue the following command as root on the ADMIN node:
        samctrl -M F


    Backout procedure (optional)
    If you need to revert the fix pack update, you will use a procedure similar to the steps described previously, except you will use a different command in step 6a. Use the following steps to back out from a fix pack update.

    a. Complete steps 1 and 2 previously discussed in this document to download the appropriate universal build and national language pack files. Alternatively you can use files in the /BCU_share directory if you maintained them from a previous installation.

    b. Complete steps 3 to 5 previously discussed in this document.

    c. Run the following command instead of the command specified in step 6a. Issue the following command as the root user on the ADMIN_ALL, DATA, and STANDBY nodes:
      /BCU_share/<new_path_to_fixpack>/installFixPack -f level -b /<install_path>/IBM/dwe/db2/V9.7 -c <nlpack_path -f NOTSAMP > /tmp/backout_<hostname>_<date>.log

    d. Complete steps 6b to 8.

    Related Information

    [{"Product":{"code":"SSKT3D","label":"IBM Smart Analytics System"},"Business Unit":{"code":"BU050","label":"BU NOT IDENTIFIED"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"}],"Version":"9.7;9.5","Edition":"","Line of Business":{"code":"","label":""}}]

    Document Information

    Modified date:
    16 June 2018

    UID

    swg21502587