As part of the overall process of
upgrading your DB2® database
server to DB2 Version 10.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 running the db2iupgrade command, the
following steps are recommended:
- Verify that 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. Refer to Verifying that your databases are ready for upgrade.
- On Linux and UNIX operating systems, ensure that
there is 5GB of free space in the /tmp directory.
The instance upgrade trace file is 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 10.1 installation.
If you are upgrading from DB2 Version 9.8,
follow the steps in Upgrading a DB2 pureScale server.
Restriction
- On Linux and UNIX operating systems, you must
not set up the instance environment for the root
user. Running the db2iupgrade or the db2icrt command
when you set up the instance environment is not supported.
- For additional restrictions on instance upgrade, review Upgrade restrictions for DB2 servers.
- You must be upgrading from DB2 Version 9.5 or DB2 Version
9.7.
Procedure
To manually upgrade your existing instances to DB2 Version 10.1 using the db2iupgrade command:
- Determine if you can upgrade your existing instances to
a DB2 Version 10.1 copy that you installed by performing 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 = Partitioned database server with local and remote clients |
Windows |
db2 GET DBM CFG | find "Node type"
Node
type = Partitioned database server 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 "Partitioned
database server with local and remote clients" therefore the instance
type is "ese" and you can only upgrade to a DB2 Version 10.1 copy of DB2 Enterprise Server Edition.
On Linux and UNIX operating systems, you can upgrade to a DB2 Version 10.1 copy of DB2 Workgroup Server Edition but
your instance is recreated with type "wse" using default configuration
values.
If you cannot upgrade your instance to any DB2 Version 10.1 copy that you installed, you must install a copy of
the DB2 Version 10.1 database product that supports upgrade of your instance
type before you can proceed with the next step.
- Disconnect all users, stop back end processes, and stop
your existing instances by running the following command:
db2stop force (Disconnects all users and stops the instance)
db2 terminate (Terminates back-end process)
- 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 10.1 copy location. The db2iupgrade command
only needs to be run 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: - Where DB2DIR is set to the location
you specified during DB2 Version 10.1 installation, fencedID is the user
name under which the fenced user-defined functions (UDFs) and stored
procedures will run, and InstName is the login
name of the instance owner. This example upgrades the instance to
the highest level for DB2 database
product that you installed, use the -k option
if you want to keep the pre-upgrade instance type.
- Where DB2PATH is set to the
location you specified during DB2 Version 10.1 installation, user and password are
the user name and password under which the DB2 service will run, 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 provided by these products, use the -F parameter
to upgrade the instance.
The db2iupgrade command
calls the db2ckupgrade command with the -not1 parameter
to verify that the local databases are ready for grade. The update.log is
specified as the log file for db2ckupgrade, and
the default log file 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 -not1 parameter
disables the check for type-1 indexes. Verify that you do not have
type-1 indexes in your databases before upgrading the instance. Refer to Converting type-1 indexes to type-2 indexes. The db2iupgrade does
not run as long as 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:
db2start
- Verify that your instance is running on to DB2 Version 10.1 by running the db2level command:
db2level
The Informational tokens
should include a string like "DB2 Version 10.1.X.X" where X is
a digit number.