top of page

Upgrading to Version 11.5 of IBM Db2 for LUW

  • Writer: Jha Chandan
    Jha Chandan
  • Mar 19, 2021
  • 8 min read

In this article we will see the steps for direct upgrade to Db2 Version 11.5 from Version 10.5 or Version 11.1 regardless of the instance bit size.

Note: First try below steps on test or non-prod server.

Before upgrading the Db2 server:

  • Keep software ready and accessible.

  • Ensure that you have root access.

  • Ensure that you meet the Installation requirements for Db2 database products.

  • Review upgrade recommendations and disk space requirements.


Pre Upgrade task:

crontab -l > cronjob.txt
db2 backup db sample compress
db2 get dbm cfg > dbm-cfg.txt
db2 get db cfg for sample > dbcfg-sample.txt
db2set -all > db2set.txt
db2 list db directory > db2-list-db-dir.txt
env > env.txt
db2 list application > list-appl.txt
db2level > db2level.txt
db2licm -l > db2licm.txt
db2ilist > db2ilist.txt

Upgrade Activity Tasks:


System Admin (OS) Task

1.System team need to take the VM Snapshot

2.Ensure that you have root access


DBA Task

3.Trigger Offline Backup

Syntax: [To list the active applications/databases]
db2 list application  
Syntax: [To force application using app. Handled id]
db2 "force application (39)"  
db2 "force application all"
Syntax: [To terminate Database Connection]
db2 terminate  
Syntax: [To deactivate Database]
db2 deactivate database sample
Syntax: [To take the backup file]
db2 backup database <db_name> to <location>   
Example:
db2 backup database sample to /home/db2inst1/offlineBKP

4. Log on to the Db2 server as root

5. Copy binary/setup file in /tmp folder and decompress the file.

gunzip -c v11.5_aix64_server.tar.gz|tar xvf -

Goto path /tmp/server_dec

ree

5. Run db2ckupgrade to find out if we are allowed to migrate the instance to

11.x level

[db2inst1@hpubuntu06 instance]$ ./db2ckupgrade sample -l /inst/db2inst1/upgrade1.log -u db2inst1 -p db2inst1
DBT5546W The db2ckupgrade utility completed successfully, however on some databases exclusive access database checks could not be completed.

6. After successful db2ckupgrade, run db2prereqcheck to find out missing requirements or system based packages, patches, etc. Fix or install missing packages like below:

Summary of prerequisites that are not met on the current system:
DBT3507E  The db2prereqcheck utility failed to find the following package or file: "sg_persist".

DBT3507E  The db2prereqcheck utility failed to find the following package or file: "sg3_utils".

DBT3613E  The db2prereqcheck utility failed to verify the prerequisites for TSA. Ensure your machine meets all the TSA installation prerequisites.

DBT3507E  The db2prereqcheck utility failed to find the following package or file: "patch".

DBT3507E  The db2prereqcheck utility failed to find the following package or file: "kernel-devel".

DBT3507E  The db2prereqcheck utility failed to find the following package or file: "gcc-c++".

DBT3507E  The db2prereqcheck utility failed to find the following package or file: "gcc".

7. After successful db2prereqcheck, stop the instance and install the db2 v11.x

binaries

8.Now proceed to upgrade the instance to 11.x using command db2iupgrade

9.After successful instance upgrade, You can proceed to upgrade the databases under that instance


Procedure for Db2 Installation:


1) Log on to the Db2 server as root.

2) Install Db2 Version 11.5.

a. Copy binary/setup file in /tmp folder and decompress the file.

gunzip -c v11.5_aix64_server.tar.gz|tar xvf -

b. Goto path /tmp/server_dec

ree

After successful db2prereqcheck, stop the instance and install the db2 v11.x binaries

[db2inst1@hpubuntu06 ~]$ db2stop
05/26/2020 04:00:00 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.

Run the db2_install command and follow below steps to install a new copy of Db2 Version 11.5.

[root@hpubuntu06 server_dec]$ sudo ./db2_install
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
DB2 installation is being initialized.

 Total number of tasks to be performed: 58
Total estimated time for all tasks to be performed: 2819 second(s)

Task #1 start
Description: Checking license agreement acceptance
Estimated time 1 second(s)
Task #1 end

Task #2 start
Description: Base Client Support for installation with root privileges
Estimated time 3 second(s)
Task #2 end

Task #3 start
Description: Product Messages - English
Estimated time 14 second(s)
Task #3 end

Task #4 start
Description: Base client support
Estimated time 359 second(s)
Task #4 end

Task #5 start
Description: Java Runtime Support
Estimated time 214 second(s)
Task #5 end

Task #6 start
Description: Java Help (HTML) - English
Estimated time 7 second(s)
Task #6 end

Task #7 start
Description: Base server support for installation with root privileges
Estimated time 8 second(s)
Task #7 end

Task #8 start
Description: Global Secure ToolKit
Estimated time 69 second(s)
Task #8 end

Task #9 start
Description: Java support
Estimated time 12 second(s)
Task #9 end

Task #10 start
Description: SQL procedures
Estimated time 3 second(s)
Task #10 end

Task #11 start
Description: ICU Utilities
Estimated time 63 second(s)
Task #11 end

Task #12 start
Description: Java Common files
Estimated time 19 second(s)
Task #12 end

Task #13 start
Description: Base server support
Estimated time 743 second(s)
Task #13 end

Task #14 start
Description: Control Center Help (HTML) - English
Estimated time 13 second(s)
Task #14 end

Task #15 start
Description: Relational wrappers common
Estimated time 3 second(s)
Task #15 end

Task #16 start
Description: DB2 data source support
Estimated time 6 second(s)
Task #16 end

Task #17 start
Description: ODBC data source support
Estimated time 222 second(s)
Task #17 end

Task #18 start
Description: Teradata data source support
Estimated time 4 second(s)
Task #18 end

Task #19 start
Description: Spatial Extender server support
Estimated time 19 second(s)
Task #19 end

Task #20 start
Description: Scientific Data Sources
Estimated time 5 second(s)
Task #20 end

Task #21 start
Description: JDBC data source support
Estimated time 233 second(s)
Task #21 end

Task #22 start
Description: IBM Software Development Kit (SDK) for Java(TM)
Estimated time 49 second(s)
Task #22 end

Task #23 start
Description: DB2 LDAP support
Estimated time 4 second(s)
Task #23 end

Task #24 start
Description: DB2 Instance Setup wizard
Estimated time 25 second(s)
Task #24 end

Task #25 start
Description: Structured file data sources
Estimated time 5 second(s)
Task #25 end

Task #26 start
Description: Integrated Flash Copy Support
Estimated time 3 second(s)
Task #26 end

Task #27 start
Description: Oracle data source support
Estimated time 4 second(s)
Task #27 end

Task #28 start
Description: Connect support
Estimated time 3 second(s)
Task #28 end

Task #29 start
Description: Application data sources
Estimated time 4 second(s)
Task #29 end

Task #30 start
Description: Spatial Extender client
Estimated time 3 second(s)
Task #30 end

Task #31 start
Description: SQL Server data source support
Estimated time 4 second(s)
Task #31 end

Task #32 start
Description: Communication support - TCP/IP
Estimated time 3 second(s)
Task #32 end

Task #33 start
Description: Tivoli SA MP
Estimated time 300 second(s)
Task #33 end

Task #34 start
Description: Base application development tools
Estimated time 33 second(s)
Task #34 end

Task #35 start
Description: DB2 Update Service
Estimated time 4 second(s)
Task #35 end

Task #36 start
Description: Parallel Extension
Estimated time 3 second(s)
Task #36 end

Task #37 start
Description: EnterpriseDB code
Estimated time 4 second(s)
Task #37 end

Task #38 start
Description: Replication tools
Estimated time 61 second(s)
Task #38 end

Task #39 start
Description: Sample database source
Estimated time 4 second(s)
Task #39 end

Task #40 start
Description: itlm
Estimated time 3 second(s)
Task #40 end

Task #41 start
Description: DB2 Text Search
Estimated time 107 second(s)
Task #41 end

Task #42 start
Description: Command Line Processor Plus
Estimated time 7 second(s)
Task #42 end

Task #43 start
Description: Sybase data source support
Estimated time 3 second(s)
Task #43 end

Task #44 start
Description: Informix data source support
Estimated time 6 second(s)
Task #44 end

Task #45 start
Description: Federated Data Access Support
Estimated time 3 second(s)
Task #45 end

Task #46 start
Description: First Steps
Estimated time 3 second(s)
Task #46 end

Task #47 start
Description: Product Signature for DB2 Server Edition
Estimated time 7 second(s)
Task #47 end

Task #48 start
Description: Guardium Installation Manager Client
Estimated time 36 second(s)
Task #48 end

Task #49 start
Description: Setting DB2 library path
Estimated time 180 second(s)
Task #49 end

Task #50 start
Description: Installing or updating DB2 HA scripts for IBM Tivoli System Automation for Multiplatforms (Tivoli SA MP)
Estimated time 40 second(s)
Task #50 end

Task #51 start
Description: Executing control tasks
Estimated time 20 second(s)
Task #51 end

Task #52 start
Description: Updating global registry
Estimated time 20 second(s)
Task #52 end

Task #53 start
Description: Starting DB2 Fault Monitor
Estimated time 10 second(s)
Task #53 end

Task #54 start
Description: Updating the db2ls and db2greg link
Estimated time 1 second(s)
Task #54 end

Task #55 start
Description: Registering DB2 licenses
Estimated time 5 second(s)
Task #55 end

Task #56 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #56 end

Task #57 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #57 end

Task #58 start
Description: Registering DB2 Update Service
Estimated time 30 second(s)
Task #58 end

Task #59 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #59 end

The execution completed with warnings.

For more information see the DB2 installation log at
"/tmp/db2_install.log.11254".
[root@hpubuntu06 server_dec]$

[root@hpubuntu06 server_dec]$ db2ls

ree

Procedure for Db2 instance upgrade:


3) Upgrade your existing instances (v10.5, v11.1) by running the db2iupgrade command from the target

Db2 Version 11.5 copy location (/opt/ibm/db2/V11.5/instance).

ree
[root@hpubuntu06 ~]$ db2ls
Install Path                       Level   Fix Pack   Special Install Number   Install Date                  Installer UID
---------------------------------------------------------------------------------------------------------------------
/opt/ibm/db2/V10.5              10.5.0.10       10                            Wed Nov 21 17:07:12 2018 EET             0
/opt/ibm/db2/V11.5               11.5.0.0        0                            Thu Dec  3 11:49:27 2020 EET             0
[root@hpubuntu06 ~]$ cd /opt/ibm/db2/V11.5/instance
[root@hpubuntu06 instance]$

The db2iupgrade command must be run only on the instance owning node. The following table shows how to run the db2iupgrade command to upgrade your instances:

[root@hpubuntu06 instance]# ./db2iupgrade -u db2fenc1 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)

Task #1 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #1 end

Task #2 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #2 end

Task #3 start
Description: Configuring DB2 instances
Estimated time 300 second(s)
Task #3 end

Task #4 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #4 end

The execution completed successfully.

For more information see the DB2 installation log at
"/tmp/db2iupgrade.log.17015".
DBI1070I Program db2iupgrade completed successfully.

4) Log on to the Db2 database server as a user with sufficient authority to start your instance.

[root@hpubuntu06 ]$ sudo su - db2inst1

5) Restart your instance by running the db2start command:

[db2inst1@hpubuntu06 ~]$ db2start
03/19/2021 09:02:15     0   0   SQL1063N  DB2START processing was successful.
SQL1063N  DB2START processing was successful.
[db2inst1@hpubuntu06 ~]$

6) Verify that your instance is running on to Db2 Version 11.5 by running the db2level command:

[db2inst1@l00lnx1186 ~]$ db2level
DB21085I  This instance or install (instance name, where applicable:
"db2inst1") uses "64" bits and DB2 code release "SQL11050" with level
identifier "0601010F".
Informational tokens are "DB2 v11.5.0.0", "s1906101300", "DYN1906101300AMD64",
and Fix Pack "0".
Product is installed at "/opt/ibm/db2/V11.5".

Procedure for Db2 databases upgrade:


7) When we try to connect to database before upgrade we will get this error.

[db2inst1@hpubuntu06 ~]$ db2 "activate database sample"
SQL5035N The connection failed because the database product has been updated and the database needs to be upgraded SQLSTATE=55001

8) Now we will proceed for db2 databases upgrade using the UPGRADE DATABASE command:

[db2inst1@hpubuntu06 ~]$ db2 "UPGRADE DATABASE sample"
DB20000I The UPGRADE DATABASE command completed successfully.

9) Verify that your database upgrade is successful. Connect to the upgraded databases and issue a small query:

[db2inst1@hpubuntu06 ~]$ db2 "connect to sample"

Database Connection Information

Database server = DB2/LINUXX8664 11.5.0
SQL authorization ID = DB2INST1
Local database alias = SAMPLE

[db2inst1@hpubuntu06 ~]$ db2 "select * from emp"
ENAME
----------
jhachandan

1 record(s) selected.

That's all in this post. If you liked this blog and interested in knowing more about IBM Db2, Please Like, Follow, Share & Subscribe to imjhachandan.com

Comments


jc_logo.png

Hi, thanks for stopping by!

Welcome to my “Muse & Learn” blog!
Muse a little, learn a lot.✌️

 

Here you’ll find practical SQL queries, troubleshooting tips with fixes, and step-by-step guidance for common database activities. And of course, don’t forget to pause and muse with us along the way. 🙂
 

I share insights on:​​

  • Db2

  • MySQL

  • SQL Server

  • Linux/UNIX/AIX

  • HTML …and more to come!
     

Whether you’re just starting out or looking to sharpen your DBA skills, there’s something here for you.

Let the posts
come to you.

Thanks for submitting!

  • Instagram
  • Facebook
  • X
2020-2025 © TechWithJC

Subscribe to Our Newsletter

Thanks for submitting!

  • Facebook
  • Instagram
  • X

2020-2025 © TechWithJC

bottom of page