Database recovery and change accumulation overview
Change accumulation is one of several IMS processes that can help you manage the successful backup and recovery of databases in the event of a system outage or application failure.
IMS log information and DBRC
While IMS is running, it records the event information that is necessary to restart the system if a hardware or software failure occurs. IMS activities are recorded in the following IMS logs:
- Write-ahead data set (WADS)
A data set containing log records that reflect completed operations and are not yet written to an online log data set.
- Online log data set (OLDS)
A data set that contains all the log records for IMS restart and recovery. There are many different types of records recorded in the logs so they eventually get archived to a system log data set (SLDS).
- System log data set (SLDS)
This data set can be very large because it holds data from one or more OLDS. The SLDS can be used as input to a number of IMS utilities (for example, change accumulation) and for an emergency restart of IMS.
- Recovery log data set (RLDS)
RLDS is like the SLDS except that it contains only the log records that are needed for a database recovery. The RLDS is mostly used as input to IMS database utilities (for example, change accumulation).
The IMS logs contain information about:
- IMS startups and shutdowns
- Changes made to databases
- Transaction requests received and responses sent
- Application program initializations and terminations
- Application program checkpoints
- IMS system checkpoints
IMS Database Recovery Control (DBRC) is the integral component of IMS that helps ensure IMS system and database integrity by recording and managing information that is associated with the logging process.
Additionally, DBRC facilitates database and log recovery by recording and maintaining information about the database and logs in the Recovery Control (RECON) data set.
As IMS runs, IMS logging records all events into the OLDS. As the OLDS fills, the records are archived to the SLDS and RLDS. These two data sets can be used as input for restart and recovery of a failed IMS or database.
The database recovery process
Recovering a database includes the following basic steps:
- Restore the database to the most recent image copy
- Use log data sets and change accumulation data sets to restore changes since the last image
copy
An image copy generally refers to a backup of database which is created by IMS utilities or IMS tools that is used as input to a database recovery utility.
- Back out any incomplete changes
Information for a database recovery can come from any or all of the following sources:
- Image copies of the database
- Log data sets (SLDS and RLDS)
- Change accumulation data sets
The need for change accumulation
One problem with using SLDS and RLDS to recover a database is the large number of records that must be processed. Many system event type records that are contained in SLDS and RLDS are not required for database recovery.
The following characteristics of SLDS and RLDS highlight the difficulties for database recovery:
- Each SLDS or RLDS contains a record of activities of the entire
system and all of the data sets within all the databases.
Recovering a database requires only a single data set.
- SLDS and RLDS chronologically notes each change to any single
record.
Database recovery requires only the value of the data at the moment the data set was lost.
Change accumulation is the process of creating a compacted version of one or more IMS log data sets by eliminating records that are not related to recovery, and by merging multiple changes to a single segment into a single change.
Change accumulation can be viewed as a condensed version of the SLDS and RLDS. OLDS can also be directly used as input to change accumulation. With change accumulation, only the most recent database change records are collected, merged, and sorted by data set for a given database.
Change accumulation performs the following functions:
- Merges updates from different subsystems
- Selects only those log records that relate to the recovery of database
- Sorts these records by data set within a database
- Saves only the most recent state of each changed part of each data set
IMS provides a change accumulation utility called Database Change Accumulation utility (DFSUCUM0) to perform the change accumulation function.
IMS Database Change Accumulation utility (also known as IMS/CA) uses the concept of change accumulation groups (CAGRP). A CAGRP can be created to represent application specific databases, physically clustered databases, logically clustered databases, or even a single critical data database. The utility ultimately produces a change accumulation data set for each CAGRP.
For further information on database recovery, see the topic "DBRC administration" in IMS System Administration.