RECOVER

Start of changeThe RECOVER utility recovers data to the current state or to a previous point in time by restoring a copy and then applying log records. The RECOVER utility can also recover data to a previous point in time by backing out committed work. End of change

The largest unit of data recovery is the table space or index; the smallest is the page. You can recover a single object or a list of objects. The RECOVER utility recovers an entire table space, index, a partition or data set, pages within an error range, or a single page. Start of changeYou can recover data from sequential image copies of an object, a FlashCopy® image copy of an object, a system-level backup, or the log.End of change Point-in-time recovery with consistency automatically detects the uncommitted transactions that are running at the recover point in time and rolls back their changes on the recovered objects. So after recover, objects will be left in their transactionally consistent state.

Output

Output from RECOVER consists of recovered data (a table space, index, partition or data set, error range, or page within a table space).

Authorization required

To run this utility, you must use a privilege set that includes one of the following authorities:

  • RECOVERDB privilege for the database
  • DBADM or DBCTRL authority for the database. If the object on which the utility operates is in an implicitly created database, DBADM authority on the implicitly created database or DSNDB04 is required.
  • Start of changeSystem DBADM authorityEnd of change
  • Start of changeDATAACCESS authorityEnd of change
  • SYSCTRL or SYSADM authority

An ID with installation SYSOPR authority can also run RECOVER, but only on a table space in the DSNDB01 or DSNDB06 database.

Restrictions on running RECOVER

The following restrictions apply to the general use of the RECOVER utility. Additional restrictions apply to point-in-time recoveries and are documented in Restrictions for point-in-time recoveries.

  • RECOVER cannot recover a table space or index that is defined to use a storage group that is defined with mixed specific and nonspecific volume IDs. If you specify such a table space or index, the job terminates and you receive error message DSNU419I.
  • RECOVER cannot recover an index that was altered to PADDED or NOT PADDED. Instead, you need to rebuild the index.
  • Start of changeRECOVER cannot recover a table space or an index to a point in time that is before a REORG operation that materializes pending definition changes.End of change
  • Start of changeRECOVER cannot recover a table space or index to a point in time if pending definition changes on that object were materialized by the REORG utility after that point in time.End of change

Execution phases of RECOVER

The RECOVER utility operates in these phases:

Phase
Description
UTILINIT
Performs initialization and setup.
RESTORE
Start of changeLocates and merges any appropriate sequential image copies and restores the table space to a backup level; processes a list of objects in parallel if you specify the PARALLEL keyword.End of change
RESTORER
Start of changeIf you specify the PARALLEL keyword, reads and merges the sequential image copies.End of change
RESTOREW
If you specify the PARALLEL keyword, writes the pages to the object.
Start of changePRELOGCEnd of change
Start of changePreliminary LOGCSR phase. Determines uncommitted work that was backed out when the recovery base for an object is a FlashCopy image copy with consistency. End of change
Start of changePRELOGAEnd of change
Start of changePreliminary LOGAPPLY phase. Applies the uncommitted work up to the point of consistency for the object with a FlashCopy image copy with consistency recovery base. End of change
LOGAPPLY
Applies any outstanding log changes to the object that is restored from the previous phase or step. If a recover job fails in the middle of the LOGAPPLY phase, it can be restarted from last commit point.
LOGCSR
Analyzes log records and constructs information about inflight, indoubt, inabort, and postponed abort units of recovery. This phase is executed if either the TORBA and TOLOGPOINT option was specified. If a recover job fails in the middle of the LOGCSR phase, it can be restarted from the beginning of the LOGCSR phase. DB2® members that finished the LOGCSR phase before the RECOVER job failure go through the LOGCSR phase again.

Start of changeFor BACKOUT YES processing, LOGCSR analyzes log records and constructs information about committed and canceled units of recovery. End of change

LOGUNDO
Rolls back any uncommitted changes that the active units of recovery made to the recovered objects. This phase is executed if either the TORBA and TOLOGPOINT option was specified. If you need to restart the recover job after it enters into the LOGUNDO phase, objects that were not changed by URs that were active during the recover to point in time will be marked as finished and no need for further processing.

Start of changeFor BACKOUT YES processing, the LOGUNDO phase backs out committed changes from the current state of the object to the prior point in time specified. In addition, any uncommitted changes at the point in time specified are rolled back. End of change

UTILTERM
Performs cleanup.