Upgrading a Db2
pureScale server to
Db2
version 12.1 on Linux® and UNIX requires that you install a new
version 12.1 copy and then manually upgrade your existing instances and databases to this
new copy.
Procedure
To upgrade to Db2 version 12.1 pureScale server:
-
Log on to the Db2 server as the
instance owner.
- Disconnect all applications and users on
every member node. 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 and all command line processor sessions are stopped,
stop the database manager instance:
db2stop
Note: The time that is needed for the db2stop command
to complete the action depends on the number of cluster caching facilities
(CFs) and members in the cluster (up to 10 minutes).
- If the db2stop command
is not successful and fails to stop the database manager instance
timeout due to new incoming connections, run the following command
to disconnect all user connections and stop the database manager
instance:
db2stop force
Ensure
that the
db2stop force command completes successfully.
- Stop all instance processes in members and cluster caching
facilities (CFs) in any order by issuing the db2stop
instance on <hostname> command on any node, where hostname is
the name of each member or CF in the cluster.
- Install Db2 version 12.1 by performing the following steps:
-
Log on to the Db2 server with root
user authority.
-
Put the cluster management software into maintenance mode on all members and cluster caching
facilities (CFs) by issuing the following command from the pre-Db2
version 12.1 installation path. This command stops the peer domain services on all
hosts and prevents it from restarting during system maintenance.
You can issue the following command only one time on any one of the members or CFs in the
cluster.
OLD_DB2_INSTALL_DIR/bin/db2cluster -cm -enter -maintenance -all
where
OLD_DB2_INSTALL_DIR is the
pre-Db2
version 12.1 installation path.
For example, if you are upgrading from Db2
version 10.5 to Db2
version 12.1, the default OLD_DB2_INSTALL_DIR is specified as
/opt/IBM/db2/V10.5.
-
Put the cluster file system into maintenance mode on all members and CFs by issuing the
following command from the pre-Db2
version 12.1 installation path. This command stops all hosts from accessing the
cluster files system (IBM® Storage Scale) during system
maintenance.
You can issue the following command only one time on any one of the members or CFs in the
cluster.
OLD_DB2_INSTALL_DIR/bin/db2cluster -cfs -enter -maintenance -all
If the above command returns a warning indicating the IBM Storage Scale module cannot
be unloaded, a reboot will be required before proceeding to next step.
- Install
Db2
version 12.1 using the command line or the Setup wizard:
- Install Db2
version 12.1 using the command line, run db2_install to install a new
copy of version 12.1. Install version 12.1 on all members and
CFs.
db2_install -y -b <install-path> -p SERVER -f PURESCALE
Note: -b
<install-path>
specifies the path where the Db2 database product
is to be installed. The value of the install-path
variable must be a full path
name, and its maximum length is 128 characters.
- Install Db2
version 12.1 using the Db2 Setup wizard. Run
the db2setup command and select the New Install option on
the Welcome panel. Choose Db2 Version 11.5
Advanced Editions with Db2
pureScale
and click Next to install a new copy of Db2
version 12.1.
db2setup -l /tmp/db2setup.log -t /tmp/db2setup.trc
In the
Configuration panel, uncheck Create an instance. The
Db2
installer still performs the installation, but, you can create an instance at a later point by
running the db2icrt or db2isetup command. The
Db2 Setup wizard
provides a clear flow through which you can start a
Db2
pureScale Feature
installation from one member and successfully setup a
Db2
pureScale environment across
multiple members. The cluster management software and the cluster file system software are also
upgraded during the installation to meet the
12.1
requirements. For more information, see
Install
Db2
version 12.1.
-
As a root user, take the cluster management software out of maintenance
mode by issuing the following command from the pre-Db2
version 12.1 installation path. You can issue the following command only one time on
any one of the members or CFs in the cluster.
OLD_DB2_INSTALL_DIR/bin/db2cluster -cm -exit -maintenance -all
Note: If the old
Db2 installation path
is of
Db2
version 10.5, you must take the cluster management software out of
maintenance mode by issuing the following
command:
OLD_DB2_INSTALL_DIR/bin/db2cluster -cm -exit -maintenance
-
Ensure that all of the db2mnt resource groups are online, by
issuing the lssam command as provided in the following
example:
lssam -s "Name like '%db2mnt%rg'"
Online IBM.ResourceGroup:db2mnt-db2sd-rg Nominal=Online
'- Online IBM.Application:db2mnt-db2sd-rs
|- Online IBM.Application:db2mnt-db2sd-rs:XXX
'- Online IBM.Application:db2mnt-db2sd-rs:YYY
If any groups are reported as
Unknown
, like in the following example, then
reenter and exit maintenance mode, as described in
7.b and
7.f:
lssam -s "Name like '%db2mnt%rg'"
Unknown IBM.ResourceGroup:db2mnt-db2sd-rg Control=MemberInProblemState Nominal=Online
'- Online IBM.Application:db2mnt-db2sd-rs Control=MemberInProblemState
|- Online IBM.Application:db2mnt-db2sd-rs:XXX
'- Online IBM.Application:db2mnt-db2sd-rs:YYY
Note: In
this scenario, you need to repeat steps b and f only; you do not need to repeat steps c, d, and
e.
-
As a root user, take the cluster file system software out of maintenance mode by issuing the
following command from the pre-Db2
version 12.1 installation path.
OLD_DB2_INSTALL_DIR/bin/db2cluster -cfs -exit -maintenance -all
-
As a root user, commit changes to the cluster file system by issuing the following command from
the Db2
version 12.1 installation path. You can issue the following command only one time on any
one of the members or CFs in the cluster.
NEW_DB2_INSTALL_DIR/bin/db2cluster -cfs -commit
where
NEW_DB2_INSTALL_DIR is the
Db2
version 12.1 installation path.
For example, if you are upgrading
from Db2
version 10.5 to Db2
version 12.1, the NEW_DB2_INSTALL_DIR is specified as
/opt/IBM/db2/V11.5.
-
As a root user, commit changes to the cluster management software by issuing the following
command from the Db2
version 12.1 installation path. You can issue the following command only one time on any
one of the members or CFs in the cluster.
NEW_DB2_INSTALL_DIR/bin/db2cluster -cm -commit
where
NEW_DB2_INSTALL_DIR is the
Db2
version 12.1 installation path.
-
As an instance owner, restart the Db2 instance
processes on all members and CFs in any order with updated resources for the cluster management
software and the cluster file system software by issuing the db2start instance on
<hostname> command on any node, where the
hostname is the name of each member or CF in the cluster.
-
Install all Db2 add-on products
that were installed in the Db2 copy from which
you are upgrading.
- Upgrade Db2
pureScale instances.
Refer to Upgrading Db2 pureScale instances.
- Upgrade databases.
What to do next
After you upgrade the Db2 server, perform
the recommended Post-upgrade tasks for Db2 servers such as resetting the diagnostic error level, adjusting
log space size, and rebinding packages. In addition, verify that the upgrade of your Db2 server was
successful.