Before running RECOVER

Certain activities might be required before you run the RECOVER utility, depending on your situation.

If the table space or index space to be recovered is associated with a storage group, Db2 deletes and redefines the necessary data sets. If the STOGROUP has been altered to remove the volume on which the table space or index space is located, RECOVER places the data set on another volume of the storage group.

If you are using Flash Copy image copies, before you start the RECOVER utility confirm that the image copies are available in disk storage. If any of the required Flash Copy image copies have been migrated to tape, issue the DFSMShsm RECALL command to restore the image copies from tape to DASD.

Recovering data and indexes

You do not always need to recover both the data and indexes. If you recover the table space or index space to a current RBA or LRSN, any referentially related objects do not need to be recovered. If you plan to recover a damaged object to a point in time, use a consistent point in time for all of its referentially related objects, including related LOB and XML table spaces, for optimal performance. You must rebuild the indexes from the data if one of the following conditions is true:

  • The table space is recovered to a point in time.
  • An index is damaged.
  • An index is in REBUILD-pending status.
  • No image copy of the index is available.

If you need to recover both the data and the indexes, and no image copies of the indexes are available:

  1. Use RECOVER TABLESPACE to recover the data.
  2. Run REBUILD INDEX on any related indexes to rebuild them from the data.

If you have image copies of both the table spaces and the indexes, you can recover both sets of objects in the same RECOVER utility statement. The objects are recovered from the image copies and logs.

Start of changeFL 506 NPSI partition in RBDPM: When a logical partition in a nonpartitioned secondary index (NPSI) is in REBUILD-pending empty (RBDPM) status, you can take the following actions:
  • If the NPSI has the COPY YES attribute and a full image copy exists, run RECOVER on the NPSI and its table space to a point in time that is prior to the LOAD job that set RBDPM.
  • Run RECOVER TABLESPACE to the current state or to a point in time prior to the LOAD job that set RBDPM. This action promotes any NPSIs in RBDPM status to REBUILD-pending (RBDP) status. The indexes must then be rebuilt. If the table space was recovered to a point in time before the LOAD operation that set RBDPM status, run REBUILD or RECOVER INDEX. If the table space was recovered to a point in time after the LOAD operation, the index can be rebuilt by using REBUILD INDEX.
End of change