DB2 10.5 for Linux, UNIX, and Windows

Upgrading DB2 Version 10.1 or DB2 Version 9.7 instances

As part of the overall process of upgrading your DB2® database server to DB2 Version 10.5, you must upgrade your instances.

Before you begin

About this task

On Linux and UNIX operating systems, you must manually upgrade your instances. On Windows operating systems, you must manually upgrade them if you did not choose to automatically upgrade your existing DB2 copy during the DB2 Version 10.5 installation.

If you are upgrading from DB2 Version 9.8, follow the steps in Upgrading a DB2 pureScale server.

Restriction

Procedure

To manually upgrade your existing instances to DB2 Version 10.5 using the db2iupgrade command:

  1. Determine whether you can upgrade your existing instances to a DB2 Version 10.5 copy that you installed by do the following actions:
    • Determine the node type. The following examples show how to use the GET DBM CFG command from the command line to find out the node type:
      Operating system Examples
      Linux and UNIX

      db2 GET DBM CFG | grep 'Node type'

      Node type = Enterprise Server Edition with local and remote clients
      Windows

      db2 GET DBM CFG | find  "Node type"

      Node type = Enterprise Server Edition with local and remote clients
    • Review Table 1 to determine the instance type by using the node type and whether instance upgrade is supported. In the previous example, the node type is "Enterprise Server Edition with local and remote clients" therefore the instance type is "ese" and you can upgrade only to a DB2 Version 10.5 copy of DB2 Server Edition.

    If you cannot upgrade your instance to any DB2 Version 10.5 copy that you installed, you must install a copy of the DB2 Version 10.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 Version 10.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:
    Operating system Command syntax
    Linux and UNIX $DB2DIR/instance/db2iupgrade [ -u fencedID ] InstNamea
    Windows "%DB2PATH%"\bin\db2iupgrade InstName /u:user,passwordb
    Note:
    1. Where DB2DIR is set to the location you specified during DB2 Version 10.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 Version 10.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 DB2 database add-on products that were installed in the DB2 copy from which you are upgrading, the instance upgrade fails and returns a warning message. If you plan to install these products later on 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 commandto verify that the local databases are ready for upgrade. The update.log is specified as the log file for db2ckupgrade, and the default log file that is created for db2iupgrade 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. The db2iupgrade does not run when the db2ckupgrade command reports errors. Check the log file if you encounter any errors.

  7. 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 Version 10.5 by running the db2level command:
    db2level 
    The Informational tokens must include a string like "DB2 Version 10.5.X.X" where X is a digit number.