Upgrading DB2 Express 9.5.4 to DB2 Express C 9.7.1

Another DB2 upgrade mini-guide. I was asked to upgrade DB2 Express 9.5.4 to DB2 Express 9.7. Reason for this was that old DB2 Express 9.5.4 was 90-day demo version and demo key expired. Upgrading DB2 will generate new 90-day key and allows to use DB2 for some more time which would be enough for finishing application development. It was small VMware DB2 instance with 1GB ram for using during application development.

I pointed that installation of DB2 Express C will be better because it will provide non expiring and license compliant DB2 version. It will save time also because future reinstalls every 90-days will not be needed. If they prefer IBM supported DB2 version then DB2 Express FTL would be an alternative choice.

I start installation by downloading and extracting DB2 Express C 9.7.1 + nls pack. Before attempting cross-version upgrades it is highly recommended to run ./db2ckupgrade from new DB2 version. This command must be run under old db2 instance userid. Invocation syntax is ./db2ckupgrade -e -l /dev/tty. Running this program requires running db2 instance. It is problem because our old instance can not be started due to expired license key. I had to borrow license key from other DB2 Express installation and add it using db2licm -a. After this db2ckupgrade runs:

db2inst1@ubuntu:/home/db2-images/expc$ ./db2ckupgrade -e -l /dev/tty
## Home directory of instance to upgrade is /home/db2inst1
Version of DB2CKUPGRADE being run: VERSION 9.7.

Database: 'TEST'



This view references a system entity that has changed; this may affect upgrade.

There is one or more warning messages in the log file. However, the database(s) can
still be upgraded.

I decided to install by using db2_install command. Execution of sudo ./db2_install -p expc -L CZ installed DB2 Express C 9.7.1 into default location with English and Czech locales. Because db2_install was used we need to do some afterinstall configuration:

  1. Migrate DAS server. This is pretty easy, just run dasmigr from new DB2 install:
    hsn@ubuntu:~/$ sudo /opt/ibm/db2/V9.7/instance/dasmigr
    SQL4410W The DB2 Administration Server is not active.
    SQL4406W The DB2 Administration Server was started successfully.
    DBI1070I Program dasmigr completed successfully.

    If you encounter any problems at this step just drop DAS server and create a new one.
  2. Migrate DB2 instance. We will use db2iupgrade command which is new in V9.7 and preferred way to upgrade DB2 instances.
    hsn@ubuntu:~/$ sudo /opt/ibm/db2/V9.7/instance/db2iupgrade -a SERVER -u db2fenc1 db2inst1

    There is one or more warning messages in the log file. However, the database(s) can still be upgraded.

    DBI1225W The authentication type of one or more cataloged local
    databases have been changed.


    One or more cataloged database entries were detected with an
    authentication type different than the authentication type for the
    instance that owns these databases. If no action is taken, all cataloged
    local database entries will inherit the authentication type from the

    User response:

    Check the log file for the db2ckupgrade command for a list of the
    cataloged local database entries that do not have the same
    authentication type as the instance. If you want the database to
    maintain its previous authentication type, you can either change the
    authentication type of the instance, or, you can move the database to
    another instance that has the desired authentication type. However,
    before changing the authentication type of the instance, you should make
    sure that you want all the cataloged local database entries to have the
    new authentication type.

    IQQD0084I The request was successfully executed.
    DBI1070I Program db2iupgrade completed successfully.
  3. Start new DB2 instance. You need to re-login as db2inst1 user and issue db2start command:
    hsn@ubuntu:~/db2-images/expc$ su - db2inst1
    db2inst1@ubuntu:~$ db2start
    SQL1063N DB2START processing was successful.

  4. Migrate database to 9.7 db2inst1@ubuntu:~$ db2 (c) Copyright IBM Corporation 1993,2007
    Command Line Processor for DB2 Client 9.7.1


    db2 => migrate database test
    SQL1243W Dropping SYSTOOLS.DB2LOOK_INFO db2look operation table failed in a
    DB2 Version 8 database.
    db2 =>
  5. Verify that we can connect to migrated database:
    db2 => connect to test

    Database Connection Information

    Database server = DB2/LINUX 9.7.1
    SQL authorization ID = DB2INST1
    Local database alias = TEST
  6. Update database to current fixpack level. This step might not be necessary.
    db2inst1@ubuntu:~$ db2updv97 -d test
    _____ DB2 Service Tools _____
    I B M
    This tool is a service utility designed to update a DB2 Version 9.7
    database to the current fixpak level.
    DB2 Universal Database Version 9.7, 5622-044 (c) Copyright IBM Corp. 2008
    Licensed Material - Program Property of IBM
    IBM DATABASE 2 Database update to current fix pack tool

    db2updv97 completed successfully for database 'test'.
  7. Execute bind commands listed in my another post. They are not necessary but its good to execute them by hand just for checking their error/warnings output and see if something is not broken.

As you can see. DB2 installation/upgrade procedures are fairly simple. There is no need to be afraid of difficult administration procedures, which is often quoted as one of reasons against migrating to DB2 from open source databases. Some administrative procedures - backup and restore, are way easier in DB2 than in opensource databases MySQL or PostgreSQL.

Views: 1735


You need to be a member of ChannelDB2 to add comments!

Join ChannelDB2

Featured Downloads

Try BLU Acceleration on Cloud

© 2019   Created by channeldb2.   Powered by

Badges  |  Report an Issue  |  Terms of Service