Overview of Datacom Forward and Backward Recovery
search cancel

Overview of Datacom Forward and Backward Recovery

book

Article ID: 18722

calendar_today

Updated On:

Products

Datacom Datacom/DB Datacom/AD

Issue/Introduction

Hardware failures or application errors can occasionally compromise database integrity. When this occurs, you must restore the database to a consistent state. This is accomplished using one of two methods:

  • Forward Recovery: Rebuilding a database from a valid backup point forward to the point of failure.

  • Backward Recovery: Rolling a current database backward to undo specific erroneous updates.

To execute either process, the DBUTLTY RECOVERY function uses the archived Recovery Files (RXX), which are generated when the active Log Area (LXX) is spilled. This article covers the primary requirements and configurations for using this utility.

Resolution

The DBUTLTY RECOVERY function protects data integrity by applying or reversing logged transactions.

Note: Logging must be active for the affected tables for recovery to be possible.

  1. RXX JCL Concatenation (Crucial) If your recovery requires processing transactions across multiple RXX files, the sequence of these files in your JCL is critical. Regardless of whether you are performing a Forward or Backward recovery, the RXX files must always be concatenated in chronological order, from oldest to newest.
    //RXX       DD  DISP=SHR,DSN=MY.RXX.FILE(-2),. . . 
    //          DD  DISP=SHR,DSN=MY.RXX.FILE(-1),. . . 
    //          DD  DISP=SHR,DSN=MY.RXX.FILE(0),. . .

    Example using absolute filenames:

    //RXX       DD  DISP=SHR,DSN=MY.RXX.FILE.G0143v00,. . .
    //          DD  DISP=SHR,DSN=MY.RXX.FILE.G0144v00,. . .
    //          DD  DISP=SHR,DSN=MY.RXX.FILE.G0145v00,. . .
  2. Defining the Recovery Scope Once the input files are concatenated logically from oldest to newest, you must define what records to process:
    • Forward Recovery: Requires a specific date/time range (from.date.time to to.date.time).

    • Backward Recovery: Typically reverses changes for a specific Transaction Sequence Number (TSN) or a specific job. While a time range can be used, TSN or Job ID is usually more precise.

  3. How the Recovery Mechanics Work Internally, Datacom processes the recovery based on the direction you choose:
    • Forward Recovery Mechanics:

      • Assumption: You have restored the database from a backup, and your from.date.time matches that backup point.

      • Process: Datacom starts at the oldest date/time in the RXX and moves forward. To ensure data integrity, the utility verifies that the oldest "Before" image in the RXX exactly matches the current state of the restored record before applying the new "After" image.

    • Backward Recovery Mechanics:

      • Assumption: You are starting with the current, contaminated database state, and you have all necessary RXX files spanning back to the from.date.time or the target TSN.

      • Process: Datacom starts at the most recent date/time (or end of the file) and processes backward. To ensure data integrity, the utility verifies that the latest "After" image in the RXX exactly matches the current state of the database record before reverting it to its "Before" image.

(Note: There are many other parameters and selection criteria available within the RECOVERY command to provide highly granular control over your data restoration).

Additional Information

For more detailed information regarding syntax and optional parameters, please refer to the Datacom/DB Database and System Administration documentation under "Using Recovery" and the DBUTLTY Reference section called "RECOVERY Command (RECOVERY)."

As always, please contact Broadcom support for Datacom if you have further questions.

***