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.
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.
//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,. . .
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.
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).
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.
***