Migrating Db2 objects, data, views, and catalog statistics

Db2 Admin Tool enables you to migrate, or copy, Db2 object definitions, the data for the objects, views, and the catalog statistics for the objects from one Db2 subsystem to other Db2 subsystems.

About this task

You can migrate any combination of this set of information (object definitions, data, views, and statistics) for Db2 databases, table spaces, and tables, as well as their dependent objects. When you migrate information, Db2 Admin Tool attempts to preserve as many of the dependent definitions as possible, such as indexes, views, table checks, synonyms, aliases, and authorizations on these objects.

Typically, this migrate (MIG) function is used to perform the following tasks:

  • Create a separate Db2 test system
  • Move a test system into a production system
  • Copy statistics from a production system to a development (or test) system so that you can test new and modified programs with the statistics from the production system
  • Consolidate two separate database systems into one

You can request either that Db2 Admin Tool migrate the objects or that Db2 Cloning Tool clone the objects.

Restrictions: The following restrictions apply to this migration process:
  • When a schema is associated with a database, you must migrate the database structure and the schema separately.
  • Databases without table spaces are not migrated. Db2 Admin Tool issues a warning message that no rows are returned.
  • For table spaces that are created with the DEFINE NO option or that are empty (or tables within these table spaces), you can migrate only the schema definitions (DDL). JCL or statements to unload the data are not created during migration.
  • When migrating at the table level and the table has a LOB column, if the migrate option DROP on target before create is set to Yes, the base table and any auxiliary LOB tables are dropped. Any LOB table space that was explicitly defined is not dropped. You must manually drop the LOB table spaces.
  • If the base table containing one or more LOB columns is dropped and recreated, the explicit auxiliary table is recreated according to its source definition. Changes to the auxiliary table are not reported. Updates to the auxiliary table are ignored if the base table is not recreated.
  • If you migrate the catalog statistics for the objects, the statistics for materialized query tables are not included.

Start of changeYou can start the MIG process by issuing the MIGRATE primary command from any panel in Db2 Admin Tool. Detailed instructions are included the following procedure.End of change

Procedure

To migrate Db2 objects, data, views, and catalog statistics:

  1. Step 1. Specify the objects and information to migrate
  2. Step 2. Generate the migration batch jobs
  3. Step 3. Run the migration batch jobs
  4. Step 4. Optional: Transfer the jobs, work statement list, and data to the target system
  5. Step 5. Run the batch define, reload, and optional jobs