You can use the IMPORT command to migrate data from one table space to another by using image copies.
You run the BMC AMI Copy for Db2 EXPORT command on the source subsystem. This command collects information about table spaces and index spaces. It also create a migration file to facilitate migration of this information. This information includes object identifiers, the names of image copies, and other information relating to the source table spaces and index spaces.
You run the BMC AMI Recover IMPORT command on the target subsystem to migrate all the image copy data to the target table spaces and index spaces that are identified by the command.
The IMPORT command uses the object identifiers found in the migration file and translates them to the object identifiers found in the target catalog.
This command requires one of the following valid passwords:
A Recovery Management for Db2 (DAD) password
A Database Administration for DB2 solution password
The DAD password allows BMC AMI Recover to run within a worklist, but does not include full-function BMC AMI Recover.
For more information about copy migration using BMC AMI Copy EXPORT and BMC AMI Recover IMPORT, see .
The following figures show the IMPORT command syntax:
IMPORT command dependencies and prohibitions
Following are command dependencies and prohibitions for IMPORT:
INCOPY is assumed and therefore is not allowed on the IMPORT command. OBID translation is also assumed.
Because the IMPORT command requires the use of image copies, you cannot specify BACKOUT.
When coding OUTCOPY and INDEP OUTSPACE, you cannot register the output image copies.
When coding INDEP OUTSPACE, REDEFINE is ignored.
BMC AMI Recover requires consistent use of the INDEP OUTSPACE option across all commands; if you use INDEP OUTSPACE with one command, you must use it with all other commands that support it. If you use INDEP OUTSPACE but subsequently omit it from another command that supports it, BMC AMI Recover issues an error message.
The IMPORT command has the following limitations:
No support for incremental copies
No support for copies of the Db2 catalog
No support for specifying DSNUM
When selecting image copies, the IMPORT command uses a DSNUM 0 copy or DSNUM n copies. DSNUM n copies are considered only when all the partitions or data sets are registered at the same log point.
Additionally, consider the following items when you use IMPORT with compressed XML data:
- When you migrate compressed XML data, BMC AMI Recover expands the XML rows to translate the internal identifiers. After the identifiers are translated, the row is recompressed, and placed back in its original location.
- If an XML row does not fit in its original location, BMC AMI Recover attempts to relocate the row to another page in the same data set.
- If BMC AMI Recover cannot store a translated row back in the same data set, message BMC96297E is issued and the space is left in the recover pending status.
- As compressed XML rows might move to a different page during IMPORT processing, the associated indexes might not be recovered from a copy and must be rebuilt. For this reason, we recommend that you specify INDEXES AUTO or INDEXES REBUILD when you use IMPORT with compressed XML data.
- ( ) BMC AMI Recover bypasses XML ID translation when XML data is being copied to another space in the same Db2 catalog.
IMPORT option descriptions
The following options are available with IMPORT:
- USING specification for IMPORT
- TABLESPACE specification option
- DEFINE for IMPORT
- OBJECTSET specification for IMPORT
- INDEPENDENT OUTSPACE specification for IMPORT
- OUTCOPY specification for IMPORT
- CLONE for IMPORT
- ANALYZE for IMPORT
- REDEFINE for IMPORT
- REUSE for IMPORT
- UPDATE VERSIONS for IMPORT
Not all of the options described are valid in a single IMPORT command. The recovery strategy that best meets your needs determines which options you should include in a single command statement.