These steps will help you to ensure that all databases on your system can
be migrated to the new DB2 Version 6 format. Before installing your new
version of DB2, perform the following steps:
You should back up all databases before installing
your new version of DB2. To back up the databases, perform the
following steps:
step 1.
| Complete all database transactions.
|
step 2.
| Ensure all applications disconnect from each database.
To list all applications that are connected to a database, enter the
db2 list applications command. If all applications are
disconnected, this command will return the following message:
SQL1611W No data was returned by the Database System Monitor. SQLSTATE=00000
To force all applications to disconnect from the database, enter the
db2 force applications all command.
|
step 3.
| Ensure all databases are cataloged. To view a list of all the
cataloged databases in the current instance, enter the following
command:
db2 list database directory
|
step 4.
| Make a backup copy of all databases. For more information on
backing up databases, refer to the Administration Guide for the DB2
version you are backing up. For the syntax of the backup command, refer
to the Command Reference for the DB2 version you are backing
up.
|
step 5.
| Stop the database manager by entering the db2stop
command.
|
Error
| Action
|
A database is in backup pending state
| Perform a backup of the database.
|
A database is in roll-forward pending state
| Recover the database as required. Perform or resume a roll-forward
database to end of logs and stop.
|
Table space ID is not in normal state
| Recover the database and table space as required. Perform or
resume a roll-forward database to end of logs and stop.
|
A database is in an inconsistent state
| Restart the database to return it to a consistent state.
|
The Version 2 database contains database objects that have a schema name
of SYSCAT, SYSSTAT, or SYSFUN
| These schema names are reserved for the Version 6 database
manager. To correct this error, perform the following steps:
step 1.
| Back up the database.
| step 2.
| Export the data from the database object (catalogs or tables).
| step 3.
| Drop the object.
| step 4.
| Recreate the object with another schema name.
| step 5.
| Import/Load the data into the object.
| step 6.
| Run the db2ckmig command against the database again, ensuring
that the database passes the db2ckmig check.
| step 7.
| Make a backup copy of the database. For more information, refer to
the Administration Guide.
|
|
The Version 2 database contains database objects that have a dependency
on the SYSFUN.DIFFERENCE function. Possible violated database
objects are:
- Constraint
- Function
- Trigger
- View
| The SYSFUN.DIFFERENCE function must be dropped and recreated
during database migration. However, if there is a database object that
is dependent on this function, migration will fail. To correct this
error:
- Constraint
- Enter the alter table command to drop the constraint.
- Function
- Enter the drop function command to drop the function dependent
on SYSFUN.DIFFERENCE.
- Trigger
- Enter the drop trigger command to drop the trigger.
- View
- Enter the drop view command to drop the view.
Note: | Any package dependent on the SYSFUN.DIFFERENCE function will be marked
inoperative after migration. Therefore, the db2ckmig command
will not report any package that is dependent on the SYSFUN.DIFFERENCE
function. For more information, refer to the Administration Guide.
|
|
The database contains user-defined distinct types (UDTs) that use the
type name BIGINT, DATALINK, REAL or REFERENCE.
| These data type names are reserved for the Version 6 database
manager. To correct this error, perform the following steps:
step 1.
| Back up the database.
| step 2.
| Export the data from any tables that are dependent on the data
types.
| step 3.
| Drop any tables dependent on the data types, and then drop the data
types. These drops may drop other objects such as views, indexes,
triggers, or functions.
| step 4.
| Create data types with different type names and recreate the tables using
the new data type names. Recreate any dropped views, indexes, triggers,
or functions.
| step 5.
| Import/Load the data into the object.
| step 6.
| Run the db2ckmig command against the database again, ensuring
that the database passes the db2ckmig check.
| step 7.
| Make a backup copy of the database. For more information, refer to
the Administration Guide.
|
|
Structured type and function have the same name.
| A structured type and function (with no arguments) belonging to the same
schema cannot have the same name. The type or function and objects
using the type or function have to dropped and recreated using another
name. To correct this error, perform the following steps:
step 1.
| Back up the database.
| step 2.
| Export the data from any tables that are dependent on the structured types
or functions.
| step 3.
| Drop any tables dependent on the structured types or functions, and then
drop the structured types or functions. These drops may drop other
objects such as views, indexes, triggers, or functions.
| step 4.
| Create structured types or functions with different type or function names
and recreate the tables using the new data type or function names.
Recreate any dropped views, indexes, triggers, or functions.
| step 5.
| Import/Load the data into the object.
| step 6.
| Run the db2ckmig command against the database again, ensuring
that the database passes the db2ckmig check.
| step 7.
| Make a backup copy of the database. For more information, refer to
the Administration Guide.
|
|
After you have successfully completed the
pre-installation checks, you can now start installing DB2 Version 6 using
either the interactive or distributed method. During the installation
of DB2 Version 6, instance migration for instances created in previous
versions of DB2 occurs. For installation procedures, see the following
sections: