Overview

Skill Level: Any Skill Level

In Linux upgrading from DB2 v11.1.x to DB2 v11.1.x is straight forward, if you just have the right Fix Pack in place, but upgrading to the recent that is from v11.1 to v11.5 needs little more work. Here are the Steps to be followed.

Ingredients

Step-by-step

  1. Collect details of the current Installation

    Login as the db2 user and enter the command db2level

    We need this to get the Version and the Installation path

     

    [db2inst1@sleeps1 ~]$ db2level

    DB21085I  This instance or install (instance name, where applicable: 

    "db2inst1") uses "64" bits and DB2 code release "SQL11010" with level 

    identifier "0201010F".

    Informational tokens are "DB2 v11.1.0.0", "s1606081100", "DYN1606081100AMD64", 

    and Fix Pack "0".

    Product is installed at "/opt/ibm/db2/V11.1".

    Now you have the exact version and then installation path. 

  2. Stop the DB2, no instance should be running. If required use the force option

    You are still logged in as db2 user. 

    [db2inst1@sleeps1 ~]$ db2stop

    08/03/2020 23:31:33     0   0   SQL1025N  The database manager was not stopped because databases are still active.

    SQL1025N  The database manager was not stopped because databases are still active.

    As you see the first time, DB2 doens’t stop, so we have to use the db2stop force command. 

    [db2inst1@sleeps1 ~]$ db2stop force

    08/03/2020 23:32:06     0   0   SQL1064N  DB2STOP processing was successful.

    SQL1064N  DB2STOP processing was successful.

    Now log out and you should be logged in as the root user

  3. Install the DB2 v11.5.4.0, yes you read that correct, we install this then upgrade the old package to this new FixPack

    You are now logged in as root user, go to Installation path from the Step 1 -> /opt/ibm/db2/V11.1

    Navigate to /opt/ibm/db2/ then go to the IBM Site and get the package. https://www.ibm.com/support/pages/download-db2-fix-packs-version-db2-linux-unix-and-windows do a wget and you should get the package downloaded there. 

    Now untar the package tar -xvf v11.5.4_linuxx64_universal_fixpack.tar.gz.

    Once done go to the universal folder /opt/ibm/db2/universal.

    Run  db2_install, this should take about 6 minutes. 

    We are Deploying a SERVER here and we don’t need the pureScale Feature, also we will use the default directory for the Install. 

    [root@sleeps1 universal]# db2_install 

    Requirement not matched for DB2 database "Server" . Version: "11.5.4.0". 

    Summary of prerequisites that are not met on the current system: 

       DBT3514W  The db2prereqcheck utility failed to find the following 32-bit library file: "/lib/libpam.so*". 


    DBT3514W  The db2prereqcheck utility failed to find the following 32-bit library file: "libstdc++.so.6". 

    Read the license agreement file in the db2/license directory.

    ***********************************************************

    To accept those terms, enter "yes". Otherwise, enter "no" to cancel the install process. [yes/no]
    yes

    Default directory for installation of products - /opt/ibm/db2/V11.5

    ***********************************************************

    Install into default directory (/opt/ibm/db2/V11.5) ? [yes/no] 

    yes


    Specify one of the following keywords to install DB2 products.

      SERVER 

      CONSV 

      CLIENT 

      RTCL 


    Enter "help" to redisplay product names.

    Enter "quit" to exit.

    ***********************************************************

    SERVER

    ***********************************************************

    Do you want to install the DB2 pureScale Feature? [yes/no] 

    no

    Requirement not matched for DB2 database "Server" . Version: "11.5.4.0". 

    Don’t worry about the warnings, this has some 59 tasks and wait for all of it to complete.

  4. The Upgrade happens here

    Now you are still as root user you will see a new Directory called /opt/ibm/db2/V11.5

    Now navigate to instance -> /opt/ibm/db2/V11.5/instance  and run db2iupgrade dbusername

    [root@sleeps1 instance]# db2iupgrade db2inst1

    DBI1446I  The db2iupgrade command is running.

    DB2 installation is being initialized.


     Total number of tasks to be performed: 4 

    Total estimated time for all tasks to be performed: 309 second(s)

    Note -> Most of the time it complains that db2 is still running. if so, Stop the db2(Explained in Step2)

     

    There are some 4 tasks here, let them all complete. Now Login as db2 user

  5. You have to migrate your database as well.

    Now you are logged in as db2 user and check the db2level again

     

    db2 => [db2inst1@sleeps1 instance]$ db2level

    DB21085I  This instance or install (instance name, where applicable: 

    "db2inst1") uses "64" bits and DB2 code release "SQL11054" with level 

    identifier "0605010F".

    Informational tokens are "DB2 v11.5.4.0", "s2006161200", "DYN2006161200AMD64", 

    and Fix Pack "0".

    Product is installed at "/opt/ibm/db2/V11.5".

    Now the DB is upgraded, one last step is to upgrade the database

    Start the DB2

    db2start

    then 

    db2 upgrade database databasename

    db2 upgrade database mdm116

     

    This might take some time depending upon the size of your Database.

     

    This is the last step and you have successfully upgraded from  DB2 v11.1.0.0 to DB2 v11.5.4.0. 

     

Join The Discussion