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 you can back up the databases and restore them to the new server. If you are migrating to a different computer, you must use the backup and restore option.

Before you begin

Before you begin

Install data warehousing in Db2, V11.1.x.

About this task

About this task

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

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.

Procedure

To migrate the Db2 server and the databases:

Procedure

Choose a migration option. You can 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 warehousing in Db2, V10.1.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 V10.1.x:
    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 V11.1.x:
    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 V11.1.x:
    migrate database database_name
Migrate the database instance that you used to create the databases in data warehousing in Db2, V10.1.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 V11.1.x is installed. For example, the default directory is:
      • On Windows: C:\Program Files\IBM\SQLLIB
      • On Linux® and UNIX: /opt/IBM/db2/V11.1
    2. Run the following command:
      db2iupgrade instance_name
  2. Migrate the existing databases. For example, run the following command in the command prompt of the instance of Db2 V11.1.x:
    migrate database database_name

What to do next

What to do next

Migrating the warehouse server metadata