To successfully migrate a database created with a previous version of the database manager, you must consider the following:
There are certain pre-conditions or restrictions that you should be aware of before attempting to migrate your database to V6:
You need SYSADM authority to migrate your database.
Space is required for both the old and new catalogs during the migration, and the amount of disk space required will vary depending on the complexity of the database as well as the number and size of the database objects. These objects include all tables and views. You should make available at least two times the amount of disk space as the database catalog currently occupies. If there is not enough disk space, migration fails.
You should also consider increasing the database configuration parameters associated with the log files. You should increase logfilsiz, logprimary, and logsecond to prevent the space for these files from running out. If log space is completely used, you will receive a SQLCODE of SQL1704N with a reason code of 3. If this happens, increase the log space parameters and re-issue the database migration command.
To successfully migrate a database, you should consider the impact of the incompatibilities between the two versions of the product. The following incompatibilities deserve special attention before you begin your migration:
Configuration Parameters
When migrating from Version 2.x to Version 6, a small number of parameters are not preserved due to a change in the behavior of the associated heap.
In order to take advantage of Version 6 enhancements, you should re-tune your database manager and database configuration after migrating your databases. To assist in this tuning, you may wish to record and compare configuration parameter values from before and after your migration. (See the GET DATABASE CONFIGURATION and GET DATABASE MANAGER CONFIGURATION commands in the Command Reference manual.)
The following are the steps you must take to migrate your database. The database manager must be started before migration can begin.
PRE-MIGRATION:
Note: | The pre-migration steps must be done on a previous release (that is, on your current release before migrating to, or installing, the new release). |
You cannot migrate a Version 2.x database that contains any database objects with a dependency on scalar function SYSFUN.DIFFERENCE.
In addition, you cannot migrate a database that contains any database objects which have a qualifier (schema name) of SYSCAT, SYSSTAT, and SYSFUN. These schema names are reserved for use by the database manager.
You cannot migrate a database where there are user-defined distinct types using BIGINT, REAL, DATALINK, or REFERENCE as the name of the type.
You cannot migrate a database where there are table spaces with containers which were defined using an absolute database path.
See the Quick Beginnings for information about migrating from previous releases, and for information about functions to help with the above step of the migration process. This book also introduces when and how to use the DB2CKMIG pre-migration utility.
Migration is not a recoverable process. If you backup your database before the Version 5 restricted schema names are changed, you will not be able to restore the database from backup using DB2 Version 6. To restore the database, you will have to use the version of the database manager from which you are migrating your databases.
Attention! If you do not have a backup of your database from before you attempted migration, and the migration failed, you will have no way of restoring your database using DB2 V6 or your previous version of the database manager.
You should also be aware that any database transactions done during the period between the time the backup was completed and the time the upgrade to V6 is complete are not recoverable. That is, if sometime following the completion of the installation and migration to V6, the database needs to be restored (to a V6 level), the logs from before V6 installation cannot be used in roll-forward recovery.
MIGRATION:
OS/2 Users: The DB2CIDMG migration program, which works in a Configuration/Installation/Distribution (CID) architecture environment, is only available on DB2 for OS/2. It allows for remote unattended installation and configuration on LAN-based workstations. You must have NetView DM/2 on your LAN to use CID migration.
UNIX Users: The Quick Beginnings describes what to do if you do not want to migrate all databases in a given instance.
Note: | During installation of V6, all of the found local database directories are migrated. It may be that you require keeping one of your current local database directories past the time of the installation of Version 6. (For example, your operating system may allow a dual boot feature: where you can have the original version of DB2 when "booting"your system one way, and the new version when "booting" the other way.) If you keep your current directories, then you may need a way to migrate that database directory to the Version 6 format at some later time. The DB2MIGDR utility allows you to complete this migration. |
POST-MIGRATION:
Complete details on the migration steps are found in the Quick Beginnings manuals for your platform.