Creating a migration file for the Copy Migration feature
Related topics
Using the MODIFY command
For more information about which data types are compatible, see the IBM SQL Reference for ALTER TABLE, SET DATA TYPE, and Data Type Compatibility for Assignments and Comparisons table.
The 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
Benefits of using the Copy Migration feature
Copy Migration feature with the BMC AMI Copy EXPORT commands and BMC AMI Recover MIGRATE and IMPORT commands provide the following benefits:
- Supports importing copies that use BMC proprietary formats
- Doesn't require you to manage data sets to keep up with current copies
- Doesn't require you to know the OBIDs from the source system
- Imports applications and object sets as a single unit
- Doesn't require you to import unchanged objects (to save time)
- Supports the use of older migration files to back date imports
- Reduces errors, ensuring more accurate data migration (for example, less likely to use the wrong data set name or OBIDs)
Using Change Manager for data migration (EXPORT and IMPORT only), the Copy Migration feature provides 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
Migration file
You can use the migration file to transfer all types of BMC AMI Copy and IBM copies between Db2 subsystems.
The migration file contains information to streamline the import recovery process with a minimum of user-supplied knowledge and intervention. You use the MIGRATE and IMPORT commands of BMC AMI Recover to complete the transfer and integration of data by using the copies.
The SYSCOPY and BMCXCOPY rows and metadata for the selected spaces are written to the designated sequential file. The metadata describes each table space with the information needed to translate OBIDs on the target system and to do checks during importing.
Each exported table space is registered in BMCXCOPY with COPY_TYPE = X. (You can use SQL Processor Using File Input (SPUFI) to find data set names of the appropriate migration files.)
For XML spaces, strings are encoded, and the encoding is saved in SYSIBM.SYSSTRINGS. The encoding might be different on different Db2 subsystems. Using the BMC AMI Copy EXPORT saves the information necessary to translate the strings in the migration file.
Use the EXPOUT option on the OUTPUT command (OUTPUT syntax options) to specify that BMC AMI Copy should create a migration file.
Example EXPORT syntax
In this example, the OUTPUT descriptor defines a data set for exporting. Later in the SYSIN, an EXPORT command refers to OUTPUT EXPFILE.
Limitations
The EXPORT command has the following limitations:
- No support for incremental copies
- No support for copies of the Db2 catalog
- No support for clone spaces or spaces that were previously in a clone relationship
No support for specifying DSNUM
First, EXPORT looks for DSNUM 0 or DSNUM 1 for either the latest full copy (LASTFULLCOPY) or for an exact RBA or LRSN. If EXPORT finds DSNUM 0, it uses that copy. If EXPORT finds DSNUM 1, it looks for DSNUM 2 and each consecutive number until it can't find a match. If EXPORT stops before reaching the number of partitions in a space, it stops with an error message.
With multi-data set non-partitioned spaces, EXPORT will look for a DSNUM 0 or DSNUM 1 full copy matching the specified RBA or LRSN, and then look for image copies of additional data sets (DSNUM 2 – DSNUM n) that were registered with the same START_RBA.
If you are using EXPORT with multi data set Large Object (LOB) table spaces, the copies should be made with RESETMOD NO. If RESETMOD YES is used with LOB table spaces, the COPY command is processed by the IBM Db2 COPY utility, and the copies of a multi-data set LOB might not be registered with the same START_RBA.
- You can't specify EXPORT INDEXSPACE or EXPORT INDEX syntax. However, indexes are included when you specify INDEXES YES.
- You can't write a migration file to a data set that is compressed via the COMPACTION option in the SMS data class. If BMC AMI Copy detects this situation, it issues message BMC180150E OUTPUT DATASET MAY NOT BE COMPRESSED.
- You can't write a migration file to an AMI Cloud data set. If BMC AMI Copy detects a cloud data set, it issues message BMC180150E OUTPUT DATASET MAY NOT BE CLOUD DATA SET. For more information about Cloud Data Sets limitations, see Requirements and restrictions for integrating BMC AMI Data for Db2 with Cloud Data Sets.