Monday, June 25, 2012

Steps to Upgrade a DB2 9.7 Instance to 10.1 on windows platform

There are two ways to upgrade a v9.7 instance to V10.1 on Windows platform.

1) Before Installing V10.1

Utility db2ckupgrade needs to be run first.
The db2ckupgrade script can be found at   <Image_path>\ESE\image\db2\Windows\utilities in the V10.1 image path.
The command  to be run -

db2ckupgrade [ -e | <dbname> ] -l <location of log file>

Example :

db2ckupgrade -e -l C:\1.log
DBT5508I  The db2ckupgrade utility completed successfully. The database or databases can be upgraded.

Note : If db2ckupgrade fails in above scenario , please refer the log file and do the needful operations on the databases to make db2ckupgrade successful.

Once db2ckupgrade runs clean , stop the instance (db2stop)  and start the DB2 V10.1 installation.

At the time of installation , SELECT the  "Work with Existing" option under ESE section.
After selection, the present instances will be listed. Select the instance that needs to be upgraded.

Above step will upgrade the instance. Then verify it by using db2level command .
Now upgrade the individual databases.

Database Upgrade Step :

$ upgrade db <dbname>


Method 2) If V10.1 is already installed and we need to upgrade the instance.

If we have already installed V10.1 , then to upgrade a v9.7 instance , we just have to go the DB2COPY of V10.1(Generally DB2COPY2) through CLP and run the following db2iupgrade command :

db2iupgrade <instance_needs_to_be_upgraded> /u:<userid_provided during installation>,<password>

Example :
db2iupgrade DB2 /u:db2admin,db2admin

Above step will upgrade the instance. Then verify it by using db2level command .
Now upgrade the individual databases.

Database Upgrade Step :

$ upgrade db <dbname>

No comments:

Post a Comment