USING specification
This topic describes the USING specification. For the syntax diagram for the USING specification, see MIGRATE syntax.
dataSetName
The USING option is required when you specify the MIGRATE command. USING specifies the name of the migration file created by the BMC AMI Copy EXPORT command. The migration file contains migration information for one or more table spaces. This information includes object identifiers, table space and index space names, and other data relating to the target table spaces and index spaces.
Option | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CHANGE TABLE FROM creator1.tableName1 TO creator2.tableName2 or CHANGE INDEX FROM creator1.indexName1 TO creator2.indexName2 | When the table names or index names are not the same between the source and the target subsystems, use the CHANGE ... FROM ... TO syntax to resolve differences. Each table or index must contain a creator and a name. You can use an asterisk (*) as any portion of the name. For example, you may want to copy the production payroll tables to the test subsystem, but the creator names between these two subsystems are different. Use the CHANGE TABLE feature to identify table name matches between the two subsystems. The migration file is searched for the FROM table name pattern and is substituted with the TO table name pattern. Multiple CHANGE ... FROM ... TO clauses are allowed in a single USING specification.You must take care when using wildcarding. If the name in the TO clause does not produce a one-to-one match for all the tables or indexes on the target space, the space is considered unrecoverable. (The FROM name is the name in the migration file. For MIGRATE, that is the name on the target system. The TO name is the name on the source for MIGRATE.) In the following specification, all the tables in the migration file with the creator name of PAYTEST resolve to a creator name of PAYPROD, which matches the tables on the source subsystem. MIGRATE USING <dataSetName> CHANGE TABLE FROM PAYTEST.* TO PAYPROD.* | ||||||||||||
INDEXES | The INDEXES option specifies how BMC AMI Recover handles indexes when you specify the MIGRATE command. (You can also use INDEX or INDEXS in place of INDEXES.) | ||||||||||||
INDEXES RECOVER | If there are indexes in the migration data set, they will be recovered. | ||||||||||||
INDEXES NO | INDEXES NO specifies that BMC AMI Recover does not recover indexes that are present in the migration data set. | ||||||||||||
EXCLUDE (dbname.ts or qualifier.ix) | Use the EXCLUDE option in the USING specification to exclude one or more objects from migration. You can use wildcards or specific names to specify the exclusions. The following wildcards are valid:
List the excluded objects following the EXCLUDE keyword. Each item in the list must be in the form dbname.ts or qualifier.ix and you must separate the individual items with commas. Enclose the list in parentheses. | ||||||||||||
DSNUM | You can exclude multiple partitions from the specified object.
| ||||||||||||
RESET | The RESET keyword causes the log points in each data page to be reset to '0'. You must specify RESET when you are migrating data from one Db2 non-data-sharing system to another because the log point values on the first subsystem are meaningless or misleading on the target Db2. | ||||||||||||
MATCHING | The MATCHING option controls the logic of IMPORT and MIGRATE processing if the table definitions are not the same for the source and target subsystems.
For more information about what data types are compatible, see the "IBM SQL Reference" for ALTER TABLE, SET DATA TYPE, and Data Type Compatibility for Assignments and Comparisons table. For more information, also see MATCHING-AUTO. |
Related topic