Upgrading Db2 11.1 or Db2 10.5 instances

As part of the overall process of upgrading your Db2 database server to Db2 11.5, you must upgrade your instances.

Before you begin

  • You must have root user authority on Linux® and UNIX operating systems or Local Administrator authority on Windows.
  • You must install any Db2 database add-on products that were installed in the Db2 copy from which you are upgrading.
  • Before you run the db2iupgrade command, do the following steps:
    • Verify that your databases are ready for the Db2 upgrade. This step is important in partitioned database environments because the db2ckupgrade command might return an error in one database partition and cause the instance upgrade to fail. For HADR environments that support upgrading without the need for standby reinitialization 1, ensure that the log shipping functionality is working for both the primary and standby. Refer to Verifying that your databases are ready for upgrade.
    • On Linux and UNIX operating systems, ensure that there is 5 GB of free space in the /tmp directory. The instance upgrade trace and log files are written to /tmp.
    • Gather pre-upgrade diagnostic information to help diagnose any problem that might occur after the upgrade.
    Note: Upgrading without standby reinitialization is supported for single partition Enterprise Server Edition (ESE) Db2 10.5 Fix Pack 7 or later databases, or Db2 pureScale® 10.5 Fix Pack 9 or later databases.

About this task

This procedure can be used to upgrade a Db2 11.1 or Db2 10.5 instance on the following operating systems:
Attention: When upgrading Linux and UNIX systems, you must manually upgrade your Db2 instances.
For Windows operating systems, if you did not choose the automatic upgrade option when you first installed Db2, you must manually upgrade your Db2 instances.


Restriction

Procedure

To manually upgrade your existing instances to Db2 11.5 using the db2iupgrade command:

  1. Determine whether you can upgrade your existing instances to a Db2 11.5 copy that you installed.:
    1. Determine the node type by running the GET DBM CFG command from the command line
      For Linux and UNIX systems:
      db2 GET DBM CFG | grep 'Node type'
      For Windows systems:
      db2 GET DBM CFG | find 'Node type'
      The following example shows a returned node type value:
      Node type = Enterprise Server Edition with local and remote clients
    2. Review Table 1 to determine the instance type by corresponding node type and whether an instance upgrade is supported. In the previous example, the node type value is Enterprise Server Edition with local and remote clients, so the instance type is ese. You can upgrade only to a Db2 11.5 copy of Db2 Enterprise Server Edition.
    Note: If you cannot upgrade your instance to any Db2 11.5 copy that you installed, you must install a copy of the Db2 11.5 database product that supports upgrade of your instance type before you can proceed with the next step.
  2. Disconnect all applications and users. To get a list of all database connections for the current instance, issue the LIST APPLICATIONS command. If all applications are disconnected, this command returns the following message:
       db2 list applications
         SQL1611W No data was returned by the Database System Monitor.
         SQLSTATE=00000
    To disconnect all applications and users, use the FORCE APPLICATION command:
       db2 force application all
  3. Stop all command line processor sessions by entering the following command in each session that was running the command line processor.
       db2 terminate
  4. When all applications and users are disconnected, stop each database manager instance:
       db2stop
  5. Log on to the Db2 database server with root user authority on Linux and UNIX operating systems or Local Administrator authority on Windows operating systems.
  6. Upgrade your existing instances by running the db2iupgrade command from the target Db2 11.5 copy location. 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:
    For Linux and UNIX systemsa
    $DB2DIR/instance/db2iupgrade [ -u fencedID ] InstName
    For Windows systemsb
    %DB2PATH%\bin\db2iupgrade InstName /u:user,password
    Note:
    1. Where DB2DIR is set to the location you specified during Db2 11.5 installation, fencedID is the user name under which the fenced user-defined functions (UDFs) and stored procedures run, and InstName is the login name of the instance owner. This example upgrades the instance to the Db2 database product from where db2iupgrade command is run. Use the -k option if you want to keep the pre-upgrade instance type (for example wse, ese).
    2. Where DB2PATH is set to the location you specified during Db2 11.5 installation, user, and password are the user name and password under which the Db2 service runs, and InstName is the name of the instance.

    If you did not install all of the Db2 database add-on products that were installed in the source Db2 database, the instance upgrade fails and returns a warning message. If you plan to install these products later, or you no longer need the functionality that is provided by these products, use the -F parameter to upgrade the instance.

    The db2iupgrade command calls the db2ckupgrade command to verify that the local databases are ready for upgrade. The update.log file is specified as the log file for the db2ckupgrade command. The default log file that is created for the db2iupgrade command is /tmp/db2ckupgrade.log.processID.

    On Linux and UNIX operating systems, the log file is created in the instance home directory.

    On Windows operating systems, the log file is created in the current directory where you are running the db2iupgrade command.
    Note: The db2iupgrade does not run when the db2ckupgrade command reports errors. Check the log file if you encounter any errors.
  7. Attention: If you are upgrading a Db2 HADR configuration on an IBM PowerHA system, do not do step 7. Proceed to step 8.
    Ensure that the standby node is updated with the current instance information by performing the following actions:
    1. Remove the old instance information from the standby database by issuing the following command on the standby node: new db2 upgrade path/bin/db2greg -delinstrec instancename=old_instance_name
    2. Add the new instance information to the standby database by issuing the following command on the standby node: new db2 upgrade path/instance/db2iset -a new_instance_name
    You can issue the previous commands on all nodes instead of just on the standby node.
  8. Log on to the Db2 database server as a user with sufficient authority to start your instance.
  9. Restart your instance by running the db2start command:
    db2start
  10. Verify that your instance is running on to Db2 11.5 by running the db2level command:
    db2level 
    The Informational tokens must include a string like "Db2 11.5.X.X" where X is a digit number.