Creating a migration file for the Copy Migration feature
You can use the
BMC AMI Copy
EXPORT command to migrate a copy or set of copies to another Db2 subsystem.
The EXPORT command creates a sequential file that contains table information about all selected table spaces for both BMCXCOPY and SYSCOPY. The file created when you use the EXPORT command is used by the BMC AMI Recover MIGRATE and IMPORT commands to move data from one or more table spaces to another.
The EXPORT, MIGRATE, and IMPORT commands make the task of moving the data between Db2 subsystems simpler and more accurate, and support all BMC AMI Copy formats (including cabinet copies).
The tables on the source and target systems do not need have the same number of columns and column types, but their columns must be compatible. The target table can have more columns and can assign default values if the table was created accordingly. 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
The benefits of the Copy Migration feature with the BMC AMI Copy EXPORT commands and BMC AMI Recover MIGRATE and IMPORT commands 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 (to save time)
- Supports the use of older migration 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 Change Manager for data migration (EXPORT and IMPORT only), you achieve the following benefits from the Copy Migration feature:
- 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
The migration file provides a method for transferring 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. The MIGRATE and IMPORT commands of BMC AMI Recover are used to complete the transfer and integration of data 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 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 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 may be different on different Db2 subsystems. BMC AMI Copy EXPORT saves the information necessary to translate the strings in the migration file.
The EXPOUT option on the OUTPUT command (OUTPUT-syntax-options) indicates that BMC AMI Copy will 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 does not find a match. If EXPORT stops before reaching the number of partitions in a space, it stops with an error message.
- You cannot specify EXPORT INDEXSPACE or EXPORT INDEX syntax. However, indexes are included when you specify INDEXES YES.
Related topics