Actions to take when you back up data

When backing up data, you can take certain actions to improve the results associated with data recovery.

During the installation of, or migration to, Db2 for z/OS® Db2 12, make a full image copy of the Db2 directory and catalog with installation job DSNTIJIC .
If this task was not done during installation or migration, use the COPY utility. to make a full image copy of the Db2 catalog and directory. If this task is not done and there are later problems with inconsistent data in the Db2 catalog or directory, the RECOVER utility cannot be used to resolve the problem.

To speed recovery of the catalog and directory indexes, take a full image copy of all the index spaces when you copy the table spaces. This task enables you to recover the table spaces and index spaces at the same time.

Periodically make image copies of the catalog, directory, and user databases
This task minimizes the time the RECOVER utility requires to perform recovery. In addition, this task increases the probability that the necessary archive log data sets are still available. Make two copies of each level of image copy data sets to reduce the risk of loss or damage.

To speed recovery of the indexes, take a full image copy of all the index spaces when you copy the table spaces. This task enables you to recover the table spaces and index spaces at the same time.

Use dual logging for active log, archive log, and bootstrap data sets (BSDSs).

This task increases the chance of recovering from all problems, and is especially useful for data inconsistency problems.

Start of changeUse redirected recovery, the RECOVER utility with the FROM option, to save production data into a test object at a point in time or at the current state with transactional consistency without affecting availability of the production object.End of change
Start of change

The data saved in the test object can be analyzed, reviewed, and validated for consistency. SQL queries can be used to compare the data in the test object to the data in the production object.

End of change
Start of changeBefore you use RECOVER, rename the data setsEnd of change
If the image copy or log data sets are damaged, using the RECOVER utility might compound the problem. Therefore, before you use RECOVER, either use IDCAMS ALTER NEWNAME to rename the data sets, or run DSN1COPY to create a copy of the data sets.

If the data sets were renamed, the RECOVER utility defines the underlying VSAM linear data sets (LDSs) for the table space or index spaces, restores the image copies, and applies log records. Then, if a problem occurs during RECOVER utility processing, a copy of the data (as it existed before you ran RECOVER) is still available.

Keep back-level image copy data sets

If an image copy of a table space or index space that contains inconsistent data is made, the RECOVER utility cannot resolve the data inconsistency problem. However, RECOVER can resolve the inconsistency if there is an older image copy of that table space or index space that is taken before the problem occurred. The MODIFY utility deletes the SYSCOPY record that describes an image copy. To retain a particular image copy for use by RECOVER, use the MODIFY utility with the TIMESTAMP of that image copy. This task also retains any later image copies.

Maintain consistent referential structures

A referential structure is a set of tables and relationships that are designed with referential constraints, such that each table in the set is a parent or dependent of itself or another table in the set. To facilitate maintaining referential consistency, keep the number of table spaces in a table space set to a minimum, and avoid tables of different referential structures in the same table space. REPORT TABLESPACESET reports all members of a table space set defined by referential constraints.

A referential structure must be kept consistent regarding point in time recovery. Use the QUIESCE utility to establish a point of consistency for a table space set, to which the table space set can later be recovered without introducing referential constraint violations.