Using MIGRATE and IMPORT for data movement


With the Copy Migration feature of the Recovery Management for Db2 solution, you can use the BMC AMI Recover MIGRATE and IMPORT commands to migrate a copy or set of copies to another Db2 subsystem.

The MIGRATE and IMPORT commands work with a sequential file created by the BMC AMI Copy EXPORT command. The sequential file contains BMCXCOPY and SYSCOPY table information about all selected table spaces. The BMC AMI Recover MIGRATE and IMPORT commands use the file to import migrated copies into the target location.

EXPORT, MIGRATE, and IMPORT make the task of moving the data between Db2 subsystems simpler and more accurate, and support all BMC AMI Copy formats (including cabinet copies).

If your migration uses the MIGRATE command, the BMC AMI Copy EXPORT runs on the target system and the BMC AMI Recover MIGRATE runs on the source system. BMC AMI Recover uses the OBIDs from the EXPORT. Optionally, log from the source system can be used with the MIGRATE command.

Warning

Important

The EXPORT file replaces the need for INCOPY and OBIDXLAT syntax with BMC AMI Recover. Records written to the file identify the correct data sets to use and how to translate the OBIDs from the source subsystem to the target subsystem.

This copy migration feature requires one of the following valid passwords:

  • A Recovery Management for Db2 solution password
  • A BMC Database Administration for DB2 solution password
Warning

Important

For more information about the BMC AMI Copy EXPORT command, see the BMC AMI Copy for Db2 documentation.

The BMC AMI Change Manager for Db2 product also has a data migration function that handles DDL definition and OBID resolution. BMC AMI Change Manager for Db2 also uses the Copy Migration feature (EXPORT and IMPORT only, not MIGRATE) of BMC AMI Copy and BMC AMI Recover. For more information, see the ALTER and BMC AMI Change Manager for Db2.

The benefits of data migration with the BMC AMI Copy EXPORT and BMC AMI Recover MIGRATE/IMPORT features include:

  • Supports importing copies that use BMC proprietary formats
  • Does not require that you manage data sets to keep up with current copies
  • Does not require that you know the OBIDs from the source system
  • Imports applications and object sets as a single unit
  • Does not require the import of unchanged objects
  • Supports the use of older EXPORT files to back-date imports
  • Provides a less error-prone, and therefore, more accurate data migration (for example, less likely to use the wrong data set name or OBIDs).

If you use BMC AMI Change Manager for Db2 with the Copy Migration feature (EXPORT and IMPORT commands only, not the MIGRATE command), you achieve the following benefits:

  • Simplifies the data movement process
  • Requires less JCL, and therefore, less JCL management
  • Supports DSNUM values other than 0
  • Supports multiple imports and multitasking
  • Ability to use migration resources stored in BMCXCOPY, such as cabinet and OCC image copies

BMC AMI Copy EXPORT file

The BMC AMI Copy EXPORT file provides a method for transferring all types of BMC AMI Copy and IBM copies between Db2 subsystems.

The EXPORT file contains information to streamline the import recovery process with a minimum of user-supplied knowledge and intervention. The MIGRATE or IMPORT command of BMC AMI Recover is used to complete the transfer and integration of data using the copies.

The latest SYSCOPY and BMCXCOPY rows and metadata for the selected spaces are written to the designated sequential file. The metadata describes each object with the information needed to translate OBIDs on the target system and to do checks during importing.

Warning

Important

EXPORT requires that the image copy is consistent to a point in time due to IMPORT processing on the target system done as TOCOPY. No log files are applied at the target. As the copies are selected for export, an attempt is made to verify that they are for the same consistent points.

If BMC AMI Copy finds an invalid image copy, BMC AMI Copy issues a message that indicates no copy was found. BMC AMI Copy assumes the EXPORT is for migration and continues processing. If a valid image copy is found, BMC AMI Copy issues a message that identifies the spaces that qualify for export.

The EXPOUT option on the BMC AMI Copy OUTPUT command indicates that BMC AMI Copy will create an EXPORT file for migration.

BMC AMI Recover MIGRATE and IMPORT commands

To initiate the import process, at a minimum you must specify the MIGRATE or IMPORT command with a USING clause. If table name ambiguity exists, you can add the CHANGE ... FROM ... TO clause. When all the tables on each target space match all the tables on one and only one space in the BMC AMI Copy EXPORT file, you do not need to specify the CHANGE ... FROM ... TO clause. Additionally, a SYNC option on the IMPORT command allows you to specify whether you want to migrate all spaces or only change spaces.

For BMC AMI Recover MIGRATE and IMPORT command syntax, see MIGRATE-command and IMPORT-command.

MIGRATE and IMPORT limitations

The EXPORT/MIGRATE or IMPORT copy migration feature has the following limitations:

  • No support for incremental copies
  • No support for copies of the Db2 catalog
  • No support for specifying DSNUM

    EXPORT looks for the most recent copy. If the copy is a DSNUM 0 copy, EXPORT uses that copy. If the copy is a DSNUM n copy, EXPORT looks for DSNUM n copies for all partitions or data sets.

  • For IMPORT, BMC AMI Recover recovers indexes that are included in the IMPORT file and rebuild other indexes, unless you specify INDEXES NO. If the source and target table spaces are not at the same version, BMC AMI Recover will not rebuild the indexes. You will need to run REPAIR VERSIONS or use the UPDATE VERSIONS option, and then rebuild the indexes in a separate step.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Recover for Db2 13.1