As part of the overall process of upgrading your Db2 database server to
Db2
version 11.1, 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 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 upgrade without the need for standby reinitialization (single partition
ESE Db2
version 10.5 Fix
Pack 7 or later databases, or Db2
pureScale® Version 10.5 Fix Pack 9 or later databases, ensure that both the primary's log shipping functionality and the standby's log replaying
functionality is working properly. 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.
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 11.1 installation.
Restriction
Procedure
To manually upgrade your existing instances to Db2 version 11.1 using the db2iupgrade command:
- Determine whether you can upgrade your existing instances
to a Db2 version 11.1 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 11.1
copy of Db2 Server
Edition.
If you cannot upgrade your instance to any Db2 version 11.1 copy that you installed, you must install a copy of
the Db2 version 11.1 database product that supports upgrade of your instance
type before you can proceed with the next step.
- 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
- Stop all command line processor sessions
by entering the following command in each session that was running
the command line processor.
- When all applications and users are disconnected,
stop each database manager instance:
-
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.
- Upgrade your existing instances by running the db2iupgrade command
from the target Db2 version 11.1 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 ] InstName a |
Windows |
%DB2PATH% \bin\db2iupgrade InstName /u:user,password b |
Note:
- Where DB2DIR is set to the location you specified during
Db2
version 11.1 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).
- Where DB2PATH is set to the location you specified during
Db2
version 11.1 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.
- Ensure
that the standby node is updated with the current instance information
by performing the following actions:
- 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
- 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.
-
Log on to the Db2 database server as a
user with sufficient authority to start your instance.
- Restart your instance by running the db2start command:
- Verify that your instance is running on to Db2 version 11.1 by running the db2level command:
db2level
The Informational tokens
must include a string like "
Db2 version 11.1.
X.
X" where
X is
a digit number.