As part of the overall process of upgrading your Db2 database server to
Db2
11.5,
you must upgrade your instances.
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:
- Determine whether you can upgrade your existing instances to a Db2
11.5
copy that you installed.:
- 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
- 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.
- 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
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:
- 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).
- 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.
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:
- 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
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.