Plans for point-in-time recovery

In some circumstances, you cannot recover to the current point in time. Plan for this possibility by establishing a consistent point in time to which to recover if these circumstances occur.

TOCOPY is a viable alternative in many situations in which recovery to the current point in time is not possible or is not desirable. When making copies of a single object, use SHRLEVEL REFERENCE to establish consistent points for TOCOPY recovery. Copies that are made with SHRLEVEL CHANGE do not copy data at a single instant, because changes can occur as the copy is made. A subsequent RECOVER TOCOPY operation can produce inconsistent data.

When copying a list of objects, use SHRLEVEL REFERENCE. If a subsequent recovery to a point in time is necessary, you can use a single RECOVER utility statement to list all of the objects, along with TOLOGPOINT, to identify the common RBA or LRSN value.

An inline copy that is made during LOAD REPLACE can produce unpredictable results if that copy is used later in a RECOVER TOCOPY operation. Db2 makes the copy during the RELOAD phase of the LOAD operation. Therefore, the copy does not contain corrections for unique index violations and referential constraint violations because those corrections occur during the INDEXVAL and ENFORCE phases.

You can use the QUIESCE utility to establish an RBA or LRSN to recover to. The RBA or LRSN can be used in point-in-time recovery.

For partitioned table spaces, if the data was redistributed across partitions by running REORG (either REORG REBALANCE or REORG to materialize limit key changes), additional recovery implications apply:
  • If you recover to a point in time and use an image copy or system level-backup that was taken before the redistributing REORG, the affected partitions are placed in REORG-pending (REORP) status.
  • If you recover to a point in time after you used ALTER to modify the limit keys but before running REORG to redistribute the data, the affected partitions are also placed in REORP status.

If you use the REORG TABLESPACE utility with the SHRLEVEL REFERENCE or SHRLEVEL CHANGE option on only some partitions of a table space, you must recover that table space at the partition level. When you take an image copy of such a table space, the COPY utility issues the informational message DSNU429I.

You can take system-level backups using the BACKUP SYSTEM utility.

Recommendation: Restrict the use of the TOCOPY, TOLOGPOINT, TOLASTCOPY, and TOLASTFULLCOPY options of the RECOVER utility to personnel with a thorough knowledge of the Db2 recovery environment.