DBRC Functions


The following sections describe DBRC's major functions:

  • "Recording and Controlling Log Information"

  • "How DBRC Helps in Recovery" on page 385

  • "Recording Information about Opening and Updating Databases" on page 390

  • "Supporting Data Sharing" on page 391

  • "Supporting Remote Site Recovery" on page 394

  • "Supporting IMSplexes" on page 395

Recording and Controlling Log Information

As IMS operates, it constantly records its activities in the IMS logs. 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

The IMS logs consist of the:

  • Write-ahead data set (WADS)

  • Online log data set (OLDS)

  • System log data set (SLDS)

  • Recovery log data set (RLDS)

Figure 23-1 shows the log data sets and restart data set (RDS) that IMS produces and the RECON data set that DBRC creates and maintains.

Figure 23-1. Logs Produced for Recovery and Restart


Related Reading: See IMS Version 9: Operations Guide for detailed discussions of the IMS logging process.

After you have initialized DBRC, it participates in the IMS logging process by recording and controlling information about IMS's logging activities. This information is recorded in the RECON data set. If you want DBRC to control the recovery of your database data sets (DBDSs), you must register them with DBRC.

DBRC automatically records many items in the RECON data set, including:

  • Information about log data sets

  • Information about database data sets

  • Information about events, such as:

    - Database updates

    - Database authorizations

    - Creation of database image copies

    - Reorganizations of databases

    - Recoveries of databases

    - Archiving of an OLDS and creation of the corresponding SLDS and RLDS

    - Execution of the Log Recovery utility

    - Subsystem sign-on

  • Definitions and information about events for Remote Site Recovery

IMS uses this information for restarting itself and for database recovery jobs (if the databases are registered with DBRC). DBRC also tracks the archiving requirements of the OLDS and, if requested, generates and submits the JCL for archiving jobs.

DBRC also provides unit-of-recovery management for all attached subsystems. DBRC provides information about these units of recovery for batch backout, dynamic backout, partial backout, and restart.

For logs produced by batch systems, you are not required to use DBRC. The advantage of using DBRC for batch jobs is that DBRC records information about all the log data sets that are produced by batch jobs and prevents batch update jobs from executing if you specify a dummy or null log data set.

Changing Log Records in the RECON Data Set

Use the CHANGE.PRILOG or CHANGE.SECLOG commands to modify the information about OLDSs, RLDSs, or SLDSs in the log record of the RECON data set. Update the log record to indicate when errors have occurred on the data sets or that volume serial numbers have changed. You do not normally need to use these commands.

Archiving an OLDS

Run the Log Archive utility to archive an OLDS to an SLDS so that IMS can reuse the OLDS. How frequently you should archive depends on the load on the subsystem and the number of log records written to the OLDSs.

The Log Archive utility always produces an SLDS. The SLDS contains all log records that are required for both database recovery and for online IMS restart.

You can ask the Log Archive utility to produce an RLDS in addition to an SLDS. The RLDS contains only those log records that are required for database recovery.

If you request an RLDS, information about the output RLDS data sets is recorded in the PRILOG record in the RECON data set and information about the SLDS data sets is recorded in the PRISLD record. If you do not request an RLDS, the same information about the SLDS data sets is recorded in both the PRILOG and PRISLD records.

If there is a secondary OLDS, or if you request that dual logs be produced from a single OLDS, the information about the secondary-log output is recorded in corresponding SECLOG and SECSLD records.

Important:

Log data sets that are output from IMS batch jobs are technically SLDSs, but the information about them is recorded in the PRILOG and SECLOG records.


Run the Log Archive utility by issuing the GENJCL.ARCHIVE command. DBRC then determines which OLDSs are full, and generates the appropriate JCL.

Related Reading: See Member DFSVSMxx in IMS Version 9: Installation Volume 2: System Definition and Tailoring for more information on the ARCHDEF statement and automatic archiving.

Recommendation:

Whether you use automatic archiving or invoke archiving yourself, make sure the archive jobs run as quickly as possible. The online subsystem only reuses an OLDS after it has been archived. If the archive job is not run and all the OLDS become full, the online subsystem waits. One way to ensure that archive jobs run quickly is to use an initiator that runs with a fairly high priority and is not used by many other users. This ensures that the archive jobs do not remain on the internal reader queue for too long.


If DBRC has marked an OLDS in the RECON data set as having errors, the GENJCL function does not submit it for archiving. If one of a pair of OLDSs has been destroyed or is unavailable, you can choose to mark it in the RECON data set as having errors.

The following references point to where you can find more information about archiving log records.

Related Reading:

  • See IMS Version 9: Operations Guide for more information about automatic, manual, and custom archiving of log records.

  • See IMS Version 9: Utilities Reference: System for more information about specifying entry points and running the Log Archive utility.

  • Refer to IMS Version 9: Customization Guide for more information about the Log Archive and the Logger exit routines.

DBRC Log-Related Commands

Use the following commands to perform DBRC log-related functions in your operational procedures:

  • CHANGE.PRILOG

  • CHANGE.RECON

  • CHANGE.SECLOG

  • DELETE.LOG

  • GENJCL.ARCHIVE

  • GENJCL.CLOSE

  • LIST.LOG

  • NOTIFY.PRILOG

  • NOTIFY.SECLOG

In addition to the LIST.LOG command, you can use a LOG or OLDS query API request to retrieve log-related information from the RECON data set.

How DBRC Helps in Recovery

DBRC can generate JCL for executing a database recovery, because DBRC records this information in the RECON data set. Whether you use the GENJCL commands to generate JCL or provide the JCL yourself, DBRC uses information in the RECON data set to determine exactly which data sets are required for input. The Database Recovery utility runs only if DBRC verifies that the JCL is correct.

You can omit all logged changes after a certain time from the input by performing a time-stamp recovery. A time-stamp recovery is equivalent to backing out the omitted changes from the database.

Most time-stamp recoveries require DBRC in order to be successful. When you involve DBRC in your request for a time-stamp recovery, DBRC selects the correct logs and, at execution time, communicates to the Database Recovery utility where to stop processing the input to correctly perform your request.

Figure 23-2 on page 386 shows how DBRC works with the Database Recovery utility.

Figure 23-2. How DBRC Works with the Database Recovery Utility


Recommendation:

Implement DBRC in phases, defining at first only a few recoverable databases in the RECON data set. This allows you to gain experience in the use of DBRC, and gives you an opportunity to assess, make, and test any changes needed in your backup, recovery, and operational procedures.


Information for a database recovery can come from any or all of the following sources:

  • Image copies of the database

  • Database reorganization data sets

  • Log data sets (SLDSs and RLDSs)

  • Change accumulation data sets

You can use DBRC to track all of these information sources, greatly simplifying the task of database recovery.

Related Reading: Refer to IMS Version 9: Operations Guide for more information about the recovery process.

If you register recoverable databases in the RECON data set, DBRC records the association of the databases to the log data sets containing database change records.

DBRC also records information about:

  • Database image copies

  • Reorganizations (except DEDB online reorganizations)

  • Recoveries

  • Change accumulations

  • Backout

DBRC is invoked by recovery tools and utilities to provide information about the resources required for database recovery. These resources can include information about image copies, logs, change accumulations, and database data sets.

DBRC can:

  • Generate JCL that can be used to run various utilities (see "Generating Recovery JCL").

  • Validate the input to those utilities (see "Validating Utility JCL" on page 389).

  • Record the result (in the RECON data set) of running the utilities (see "Recording the Result" on page 390).

Generating Recovery JCL

You can use the GENJCL.RECOV command to generate the JCL that is necessary to recover a registered database data set. Using information recorded in the RECON data set, DBRC:

  1. Selects the image copy data set to use for loading the most recent image copy.

  2. Selects the change accumulation and log data sets that are to be input to apply all the changes that were logged since the image copy was created.

If change accumulation input is required (because of data sharing), but it is not present or usable, DBRC informs you of that fact and the GENJCL.RECOV command fails.

The GENJCL.USER command can generate user-defined output, which can include JCL. No skeletal JCL execution members are supplied to support the GENJCL.USER command. If you want to enter GENJCL.USER commands, you must supply the members to support them.

Issue the GENJCL command to request that DBRC generate JCL in batch or issue the /RMGENJCL command online. When you enter either command, DBRC reads skeletal JCL and replaces symbolic parameters with actual values based on the information recorded in the RECON data set to build the appropriate JCL. For example, if you request that DBRC generate JCL to recover a database, DBRC retrieves the skeletal JCL member from the library and completes the JCL with information about the latest image copy, change accumulation, and log data sets, if necessary. Your databases must be registered in order for DBRC to generate JCL to process them.

The amount of time and effort required to recover a database can be significantly reduced by using the GENJCL to generate the JCL and control statements necessary for the recovery. Using the GENJCL command also eliminates the causes of many recovery errors. You could spend a large amount of time during database recoveries determining which input data sets should be provided in what order to the Database Recovery utility.

When change accumulation data sets or PRILOG records (in the RECON data set) are available, DBRC selects them rather than the SLDS for recovery. This results in quicker database recoveries if you run the Database Change Accumulation regularly. DBRC knows which log data sets are required and ensures that IMS processes all volumes in the correct order. DBRC also selects the most recent image copy for database recovery.

DBRC always selects the optimum input for the Database Recovery utility by using change accumulation data sets whenever possible. If you have not used the Database Change Accumulation utility, or if that utility did not process some log data sets, DBRC selects the required log data sets from the PRILOG (or SECLOG) records, which can contain RLDS, SLDS, or both RLDS and SLDS entries.

Related Reading:

  • See IMS Version 9: Installation Volume 2: System Definition and Tailoring for more information about the tailoring actions for IMS.PROCLIB members, the DBRC procedure, and the JCLOUT and JCLPDS DD statements.

  • See IMS Version 9: Database Recovery Control (DBRC) Guide and Reference for details about customizing your own skeletal JCL and about the contents of IMS-supplied skeletal JCL.

Recommendation:

For increased availability of data entry databases (DEDBs), use the DEDB Area Data Set Create utility to provide additional usable copies of an online area. It does not provide backup copies for recovery. The DEDB Area Data Set Create utility uses the RECON data set as part of its input.


Validating Utility JCL

When a recovery utility processes a registered database data set, the utility presents its input to DBRC for validation. Whether the recovery JCL was created by you or by DBRC, DBRC verifies that the input JCL to the utility is correct (according to the current information in the RECON data set). It is possible, even if you created the JCL with the GENJCL command, that intervening events could invalidate the input JCL before the utility is run.

DBRC is invoked by the following IMS utilities and services to validate input and record the results:

  • Index/ILDS Rebuild utility (DFSPREC0)

  • Database Image Copy utility (DFSUDMP0)

  • Database Image Copy 2 utility (DFSUDMT0)

  • Online Database Image Copy utility (DFSUICP0)

  • Database Change Accumulation utility (DFSUCUM0)

  • Batch Backout utility (DFSBBO00)

  • Database Recovery utility (DFSURDB0)

  • Log Recovery utility (DFSULTR0)

  • Log Archive utility (DFSUARC0)

  • HALDB online reorganization

  • HD Reorganization Unload utility (DFSURGU0)

  • HD Reorganization Reload utility (DFSURGL0)

  • HISAM Reorganization Unload utility (DFSURUL0)

  • HISAM Reorganization Reload utility (DFSURRL0)

  • Database Prefix Update utility (DFSURGP0)

  • DEDB Area Data Set Create utility (DBFUMRI0)

  • /RECOVER commands

Figure 23-3 on page 390 shows DBRC's role in running the previously mentioned utilities.

Figure 23-3. DBRC's Role in Utility Execution


Related Reading: See IMS Version 9: Utilities Reference: Database and Transaction Manager for more information on the IMS recovery utilities.

When you run the Batch Backout utility (DFSBBO00), DBRC determines the complete set of logs that are needed for a particular backout job. In addition, DBRC manages information about the logs so that backout and restart jobs can be easily coordinated.

Exception:

DBRC does not verify the JCL input for the HD and the HISAM Reorganization utilities, but does record information about their execution in the RECON data set.


Recording the Result

When the recovery completes successfully, DBRC records information about the recovery in the RECON data set. If you performed a time-stamp recovery, DBRC records information about the range of omitted changes.

Requirement:

If a time-stamp recovery is performed within a database allocation interval, you must immediately create an image copy to ensure a valid starting point for subsequent recovery attempts. DBRC then prevents the changes from being reapplied on any subsequent recovery.


Recording Information about Opening and Updating Databases

After IMS opens a database, DBRC passes back the RECON data set initialization token (RIT) and any extended error queue elements (EEQEs) associated with each DBDS. The RIT allows IMS to determine whether the database has been used without DBRC or whether the database has been controlled by a different RECON data set.

Related Reading: See IMS Version 9: Operations Guide for information on EEQEs.

When changes to DBDSs and areas occur, DBRC records information about these changes in the RECON data set. DBRC subsequently uses this information to determine which log data sets might contain change records for a given DBDS or area.

When a DBDS that is registered in the RECON data set is first opened for updates (or allocated), IMS tells DBRC to create an ALLOC record. In the case of a DEDB area, the ALLOC record is created when the area is first opened for update. The ALLOC record identifies the DBDS or area and contains the time stamp of the first update and the open time stamp of the corresponding PRILOG.

When DBRC creates the ALLOC record, DBRC also enters the name of the DBDS or area being changed in the LOGALL record for the PRILOG that is active at the time of the change.

When you deallocate (close) a DBDS or area using a /DBRECOVERY command from the operator console of the online IMS subsystem, DBRC writes a deallocation time stamp in the ALLOC record. If no deallocation time is recorded, DBRC uses the closing time of the associated log as the deallocation time. Thus the RECON data set contains a list of the names of DBDSs or areas for which change records might exist on a given log data set (LOGALL record), a list of the time ranges where changes could exist for a specific DBDS or area (ALLOC records), and a list of the logs containing the changes.

Supporting Data Sharing

Data sharing introduces the concept of database authorization. Database authorization determines if an online IMS or batch IMS can have access to the requested databases. DBRC authorizes or refuses to authorize access to the databases depending on the current authorizations and the access intent of the IMS system.

Data sharing requires that the databases be registered with DBRC. DBRC checks that subsystems have authority to perform the requested task and that other subsystems are not currently reserving the database.

Related Reading: See IMS Version 9: Operations Guide and IMS Version 9: Administration Guide: System for more information on data sharing.

Access Intent

DBRC determines access intent. When IMS tries to allocate a database:

  • For a batch job, DBRC uses the processing option (PROCOPT) of the PSB for each database to determine the access intent. If the PSB has multiple PCBs for the same database, the highest intent level for that database is used.

  • For an IMS TM online system, the value specified on the ACCESS keyword of the DATABASE macro sets the access intent. You can change this access intent by issuing a /STA DB command.

There are four levels of access intent for a database. Table 23-1 shows these attributes in reverse order, from the highest access intent (the most restrictive) to the lowest (the least restrictive)

Table 23-1. Database Access Intent Attributes

ACCESS Keyword Values

Description

Exclusive access (EX)

The IMS system requires exclusive access of the database. No sharing is allowed regardless of the share options registered in DBRC.

  • Batch: PROCOPT of L or xE (where x = A,D,G,I, or D)

  • Online: ACCESS of Ex

Update access (UP)

The IMS system can update the database. Even if no updates actually take place, the database is held in update mode. Any logs created with actual changes during this process are required for recovery or change accumulation.

  • Batch: PROCOPT of A,I,R, or D

  • Online: ACCESS of UP

Read with integrity access (RD)

The IMS system only reads the database, but it also checks any enqueue or lock held by other IMS systems. The IMS system waits for the lock to be released before processing.

  • Batch: PROCOPT of G

  • Online: ACCESS of RD

Read without integrity access (RO)

The IMS system only reads the database and it does not check for any lock or enqueue held by other IMS systems.

  • Batch: PROCOPT of GO

  • Online: ACCESS of RO


Levels of Data Sharing

DBRC supports the two levels of IMS data sharing:

Database level

The entire database or DEDB area is a resource that can be accessed for update by a single IMS system at a time. For area resources this can also be called area-level sharing.

Block level

A database or DEDB area can be accessed by multiple IMS subsystems concurrently. Data integrity is preserved for the IMS subsystems that access the shared data. Within a database or area, resources are reserved at the block level.

Definition:

For OSAM databases, the block is a physical data block that is stored on DASD. For VSAM databases and DEDBs, the block is a control interval (CI).


Recording Data-Sharing Information in the RECON Data Set

DBRC records the following data-sharing information in the RECON data set for all registered databases:

  • Sharing level allowed for each database

  • Names of databases or areas currently authorized for processing

  • Names of IMS subsystems that are involved

  • Statuses of the IMS subsystems

  • Database statuses from a recovery viewpoint

Assigning a Sharing Level with DBRC

The sharing level of a database or DEDB area determines whether a request for access is granted. DBRC allows you to establish one of four sharing levels.

The following sharing levels are defined using the INIT.DB command and modified with the CHANGE.DB command.

SHARELVL 0

The database is not to be shared. The database can be authorized for use by one IMS system at a time. SHARELVL 0 is equivalent to specifying ACCESS=EX on the /START command.

SHARELVL 1

Sharing is at the database level. One IMS system can be authorized for update at one time; any sharing systems can only be authorized for read-only processing. Another configuration for SHARELVL 1 is to authorize all IMS systems for read-only processing of the shared data.

SHARELVL 2

Sharing is at the block level but only within the scope of a single IRLM and a single z/OS. Sharing requires that IMS subsystems sharing a database use the same RECON data set. Multiple IMS systems can be authorized for update or read processing.

SHARELVL 3

Sharing is at the block level by multiple IMS subsystems using multiple instances of IRLM. Multiple IMS systems can be authorized for non-exclusive access. The IMSs can be on multiple z/OS images using different IRLMs. As with SHARELVL 2, all IMS subsystems sharing a database must use a single RECON data set.

Note:

To ensure the integrity of databases in data-sharing environments when batch jobs running without IRLM support access SHARELVL 3 databases, DBRC authorizes batch jobs that have update access only if all other IMS systems and batch jobs that are currently authorized by DBRC to the database have read-only access.

If IRLM=N is specified in the IMSCTRL macro or DBBBATCH procedure, DBRC authorizes a batch job for update access to a database only if all other IMS systems and batch jobs that are currently authorized by DBRC to the database have read-only access.

When a batch IRLM=N job has authorization for update, authorization for an online system or other batch job fails unless it is for read-only access.


Supporting Remote Site Recovery

DBRC assists you with the definition and management of IMS components in the RSR complex. In support of RSR, DBRC provides:

  • Commands to define, update, and display the status of the RSR complex.

    The RECON data set contains the definition of an RSR complex.

  • Services that are used by an active subsystem to identify the tracking subsystem and the databases covered by RSR.

    An active subsystem obtains the identity of its tracking subsystem from DBRC. As databases are updated by the active subsystem, DBRC tells the database component whether the database is covered by RSR. If the databases are being tracked by RSR, the active subsystem sends its log data to the tracking subsystem.

  • Services used by a tracking subsystem to record information about log data that is received from an active subsystem.

    As logs are received and stored at the tracking site, DBRC records the receipt of the log data. When begin-update records are received for registered databases, DBRC records the database update.

  • Tracking subsystem database support:

    - Two types of tracking (called shadowing ): Database-Level Tracking (DBTRACK) or Recovery-Level Tracking (RCVTRACK).

    - Maintains log data set information for online forward recovery.

    - Records which database change records have actually been applied to the covered databases.

  • Services to assist in the takeover process.

During a remote takeover, DBRC changes the state information of the registered databases at the new active site to indicate that they are now the active databases.

Related Reading: See IMS Version 9: Administration Guide: System for more information about controlling database recovery in an RSR environment.

Supporting IMSplexes

When an I/O error occurs on a RECON data set in an IMSplex and a spare data set is available, the instance of DBRC that noticed the error copies the good RECON data set to the spare, activates the spare, and deallocates the original RECON data set.

At this point in the processing, the DBRC that noticed the I/O error can automatically notify the other DBRCs in the IMSplex about the reconfiguration. Then, after the original RECON data set is deallocated, it can be deleted and redefined as the spare RECON data set.

Related Reading: See IMS Version 9: Common Service Layer Guide and Reference for more information about IMSplexes.



Introduction to IMS. Your Complete Guide to IBM's Information Management System
An Introduction to IMS: Your Complete Guide to IBMs Information Management System
ISBN: 0131856715
EAN: 2147483647
Year: 2003
Pages: 226

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net