Migrating the DB2 instance and databases on the data server

To migrate DB2® to a new server, you can either migrate the DB2 instance and its databases, or back up the databases and restore them to the new server. If you are migrating to a different computer, you must use the back up and restore option.

Before you begin

Install InfoSphere™ Warehouse, Version 9.7.

About this task

The steps provided in this procedure are general and might not be sufficient for your particular environment. For more detailed information about how to upgrade your DB2 client and instance, see the Related information section below.

To run the commands for backing up, restoring, and migrating DB2, you must be the instance owner. To run the db2iupgrade command, you must have root or administrator authority. For more information about these commands, see the Related information section below.

Procedure

To migrate the DB2 server and the databases:

Choose a migration option. You can either back up and restore the old databases, or you can migrate the database instance that you used to create the databases and the databases that are associated with this instance.
Option Description
Backup and restore the databases that are used in Data Warehouse Edition, V9.5.x
  1. Back up the existing databases by using the backup command. For example, run the following command in the command prompt of the instance of DB2, V9.5:
    db2 backup db database_name
  2. Restore the databases that you backed up in the previous step. For example, run the following command in the command prompt of the instance of DB2, V9.7:
    db2 restore db database_name
  3. Migrate the existing databases. For example, run the following command in the command prompt of the instance of DB2, V9.7:
    migrate database database_name
Migrate the database instance that you used to create the databases in Data Warehouse Edition, V9.5.x
Restriction: You cannot migrate to a different computer with this option.
  1. Upgrade the existing database instance by running the db2iupgrade command with root or administrative authority:
    1. Go to the directory where DB2, V9.7 is installed. For example, the default directory is:
      • On Windows: C:\Program Files\IBM\ISWarehouse\sqllib\bin
      • On Linux and UNIX: /opt/IBM/ISWarehouse/db2/V9.7/instance/
    2. Run the following command:
      db2iupgrade instance_name
      Note: The db2imigr command is deprecated in DB2, V9.7. Use the db2iupgrade command.
  2. Migrate the existing databases. For example, run the following command in the command prompt of the instance of DB2, V9.7:
    migrate database database_name

What to do next

Migrating the Administration Console metadata


Feedback | Information roadmap