This procedure describes how to migrate DB2 instances that were created using a previous version of a DB2 product.
Before you can migrate an instance to use the latest version of DB2, you
must install DB2 Version 5 on your system.
![]() |
If there are several DB2 instances using previous versions of DB2 products,
you do not need to migrate all of these instances at this time.
Instances, that are not migrated, will continue to use previous versions of
DB2 products.
|
Each DB2 instance must be migrated separately. To successfully migrate a DB2 instance, you need to perform the following steps:
Note: | If you want to migrate several instances, you must repeat these steps for each instance. |
Before you can migrate a DB2 instance, all applications using any databases, owned by this instance, must be completed or terminated. To prepare a DB2 instance for migration, you need to perform the following steps:
db2 list applications
db2 force applications all
Note: | It is not recommended to force termination of applications. Some applications may have unexpected behavior when terminated using this command. |
For usage and details of this command, refer to your current release Command Reference.
db2 list applications
![]() |
Follow these instructions if you are using the user exit program,
db2uexit, with previous versions of DB2.
|
DB2 Version 5 has changed the interface it uses to invoke the user exit program to archive and retrieve log files. These new interfaces are documented in the Administration Guide . The name for the user exit program has changed to db2uext2 in Version 5; in previous versions, it was called db2uexit.
The following should be considered before migrating instances:
cp DB2DIR/misc/db2uext.v2 INSTHOME/sqllib/adm/db2uext2
where | DB2DIR | = /usr/lpp/db2_05_00 | on AIX |
|
| = /opt/IBMdb2/V5.0 | on HP-UX or Solaris |
cp DB2DIR/misc/db2uext.pe INSTHOME/sqllib/adm/db2uext2
where | DB2DIR | = /usr/lpp/db2_05_00 | on AIX |
|
| = /opt/IBMdb2/V5.0 | on HP-UX or Solaris |
Note: | You must ensure that db2uext2 is owned by the instance owner and is executable by the owner. |
At a convenient time, you should modify your user exit program to use the new Version 5 interfaces. The new user exit program should replace db2uext2 in the INSTHOME/sqllib/bin orsqllib\bin directory, used to support the pre-version 5 user exit program, db2uexit, which should be removed.
After an instance is ready for migration, use the db2imigr command to migrate the instance. You need to perform the following steps:
DB2DIR/instance/db2imigr [-d] [-a AuthType] [-u fencedID] InstName
where | DB2DIR | = /usr/lpp/db2_05_00 | on AIX |
|
| = /opt/IBMdb2/V5.0 | on HP-UX or Solaris |
and where:
Notes: