Handling Db2 versioning information
To move objects to another Db2 subsystem
Ensure that the object definitions on the source and target Db2 subsystems are the same.For table space, each table must have the same number of columns, and each column must be the same data type.
If you are copying indexes that have not been altered in Db2, check the SYSIBM.SYSINDEXES catalog table on both subsystems to ensure that the value in both the CURRENT_VERSION column and the OLDEST_VERSION column is 0.
Run BMC AMI Recover on the target subsystem with the OBIDXLAT option. On the control statement, specify the proper mapping of table database object identifiers (OBIDs) for the table space or index from the source to the target subsystem.
Run DB2 REPAIR VERSIONS on the object on the target subsystem or specify the BMC AMI Recover UPDATE VERSIONS option in step 3.This action updates the version numbers in the target system’s catalog using the version numbers in the system pages or index directory pages that have been laid down from the source system.
For table spaces, the utility updates the following columns:
- OLDEST_VERSION and CURRENT_VERSION in SYSTABLEPART
- VERSION in SYSTABLES
- OLDEST_VERSION and CURRENT_VERSION in SYSTABLESPACE
For indexes, the utility updates OLDEST_VERSION and CURRENT_VERSION in SYSINDEXES. Db2 uses the following formulas to update these columns in both SYSTABLEPART and SYSINDEXES:
CURRENT_VERSION = MAX(target.CURRENT_VERSION,source.CURRENT_VERSION)OLDEST_VERSION = MIN(target.OLDEST_VERSION,source.OLDEST_VERSION)- If you need to rebuild indexes on your target system, you can do so now.