REBUILD INDEX command
The REBUILD INDEX command specifies that one or more indexes on tables in a single table space are to be rebuilt from the data in the table space. If the index is a partitioned index on a partitioned table space and you do not specify a partition, BMC AMI Recover rebuilds all partitions of a partitioned index. You can specify a single partition of the index.
You can include multiple REBUILD INDEX command statements in a single BMC AMI Recover execution, along with RECOVER TABLESPACE and RECOVER UNLOADKEYS command statements. All command statements are examined and processed as efficiently as possible.
If you request simulation mode with the SIMULATE YES option, which requires a valid Recovery Management for Db2 solution password, you must use SIMRBLD INDEX rather than REBUILD INDEX.
When INDEXLOG is set to NO in the installation options or with the OPTIONS command, RECOVER INDEX and REBUILD INDEX are synonyms. Any reference to REBUILD INDEX in this section also applies to RECOVER INDEX when INDEXLOG is set to NO. RECOVER INDEXSPACE, however, is never a synonym for REBUILD INDEX, regardless of the value of INDEXLOG.
When an index is rebuilt, key values are instantiated in the current version of the table, regardless of the version of the table row from which the key value was extracted. (Db2 added online schema evolution that provided versioning of tables.)
When you use REBUILD INDEX with a RECOVER TABLESPACE that includes OBIDXLAT and INDEP OUTSPACE, the OBIDXLAT in the RECOVER TABLESPACE statement must specify the OBIDs for the indexes specified in the REBUILD INDEX statement. Because REBUILD INDEX does not have an OBIDXLAT clause, specifying the OBIDs in the RECOVER TABLESPACE statement is the only way to get the OBIDs translated in the index header page. For more information, see OBIDXLAT specification.
This section describes the syntax of the REBUILD INDEX command and its options.