Quick Beginnings

Migrating from Previous Versions of DB2

If you are migrating from Version 5.0 or Version 5.2 to DB2 Version 7, you must prepare your databases and instances before installing DB2 Version 7. If you are upgrading from Version 6, there is nothing you have to do prior to installing Version 7.

The migration of pre-Version 5.0 databases and instances is not supported in DB2 Version 7.

When you migrate from a Version 5.x or Version 6 database system to a DB2 Enterprise - Extended Edition Version 7 database system, depending on the installation option you choose, the installation program will migrate all instances to the Version 7 multipartition or single-partition format. If you are migrating a database with populated tables, refer to the Administration Guide for descriptions of how to add database partition servers to a system and redistribute data across database partitions.

After you install DB2 Enterprise - Extended Edition, any databases that you created with earlier versions of DB2 will not automatically work with the new version of DB2. You must follow the steps in this section to migrate your instances and then to move data from the previous database system to the new one. Although your data is not changed during the process, the database is different from the original one. The differences depend on the type of database system from which you are migrating.

Preparing Databases and Instances for Migration

This section describes how to prepare existing DB2 Version 5.x databases and instances for migration to a format usable by DB2 Version 7. If you want to migrate more than one instance, you must repeat these steps for each instance.

You must be logged in as the instance owner to complete these steps.

To prepare your databases for migration:

  1. Ensure that there are no applications using any databases owned by the DB2 instance you are preparing to migrate. To get a list of all applications owned by the instance, 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
    

    You can end a session by entering the db2 terminate command.

  2. Ensure that 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
    
  3. Make a backup copy of all Version 5.x databases. You do not have to back up Version 6 databases. Refer to the Administration Guide for your DB2 product for information on making a backup copy of a database and to the Command Reference for the syntax of the backup command.
  4. When all applications are complete and you have backed up your databases, stop all database server processes owned by the DB2 instance by entering the db2stop command.
  5. Stop the DB2 license daemon by entering the db2licd -end command.
  6. Stop all command line processor sessions by entering the db2 terminate command in each session that was running the command line processor.
  7. Ensure that the db2profile (bash, Bourne, or Korn shells) or db2cshrc (C shell) instance environment setup script, under the instance's INSTHOME/sqllib/ directory, is of the proper shell syntax.

    If necessary, ensure that each export statement is separated into different lines. For example:

       DB2INSTANCE=db2inst1       //bash, Bourne, or Korn shells
       export DB2INSTANCE
     
       set DB2INSTANCE=db2inst1   //C shell
    

To update a DB2 Enterprise Edition Version 7 database system to a DB2 Enterprise - Extended Edition Version 7 system, you must update your instance using the db2iupdt command. For more information, refer to the Administration Guide.


[ Top of Page | Previous Page | Next Page ]