Database quiesce

By quiescing a database, DEDB area, HALDB partition, or a database group, you can create a recovery point across databases and logs, create clean database image copies without taking a database offline, and improve the performance of the Database Change Accumulation utility (DFSUCUM0).

When a database is quiesced, no updates to the database are in progress, all prior updates have been committed and written to DASD, and application programs with new updates for the database are held in a wait state until the database is released from its quiesce state. The database is fully quiesced when the last in-progress update is committed in the database.

After the quiesced state is reached, DBRC records a deallocation (DEALLOC) time stamp in the allocation (ALLOC) record for the database, area, or partition in the RECON data set. The DEALLOC time stamp is used as the recovery point for recoveries and the recovery utilities, such as the Database Recovery utility (DFSURDB0) and the DFSUCUM0 utility.

Quiescing a database does not alter the database data sets. The quiesce function leaves the database data sets in the same state that they were in when the quiesce function starts.

Unlike other methods for creating recovery points, such as issuing the /DBRECOVERY command, quiescing a database requires only the issuance of a single command. IMS automatically places application programs in a wait state after any in-progress updates are committed and automatically restores access to the database when the quiesce is released. Creating a recovery point by using the /DBRECOVERY command requires stopping all database activity, unauthorizing and taking the database offline, and then restarting everything afterward.

The relative ease and speed of the database quiesce function, as well as its minimal impact on database availability, makes creating frequent recovery points less expensive. Creating frequent points of recovery shortens the time required for recoveries and improves the performance of the Database Change Accumulation utility (DFSUCUM0) by reducing the number of log records the utility must merge.

Database types that support the quiesce function

You can quiesce Fast Path DEDB databases, full-function databases, database groups, DEDB areas, and HALDB partitions.

Specifically, the following types of databases support the quiesce function:

  • DEDB
  • HDAM
  • HIDAM
  • HISAM
  • HSAM
  • PHDAM
  • PHIDAM
  • PSINDEX
  • SHISAM
  • SHSAM

GSAM and MSDB databases do not support the quiesce function.

For DEDB databases, you can quiesce the entire database, which quiesces all of the areas in the DEDB, or you can quiesce a subset of one or more areas directly. Similarly, for HALDB PHDAM, PHIDAM, and PSINDEX databases, you can quiesce the HALDB master database, which quiesces all of the partitions in the database, or you can quiesce a subset of one or more partitions directly. When either a DEDB database or a HALDB database is quiesced at the database level, the quiesce status is maintained in the records for each area or partition rather than in the database record.

Because DBRC is required to manage access to the database and to record the time stamp used for recovery, quiescing a database that is not registered, although technically possible, is not recommended.

Quiesce options

When quiescing a database, you have the following options:

  • You can quiesce a database just long enough to create a recovery point.
  • You can hold a database in the quiesce state indefinitely to run either an image copy utility or the Database Change Accumulation utility (DFSUCUM0). To release a database that is held in the quiesce state, issue the appropriate UPDATE command with the STOP(QUIESCE) keyword specified.

    The UPDATE commands on which you can specify the STOP(QUIESCE) keyword include:

    • UPDATE AREA
    • UPDATE DATAGRP
    • UPDATE DB
  • You can specify a timeout interval for IMS to wait for application programs to commit their updates before IMS cancels the quiesce process.

When you quiesce a database to create a recovery point, as soon as the database reaches a point of consistency, IMS immediately releases the database from the quiesce state and application programs can resume updating the database.

To momentarily quiesce a database, area, partition, or database group, for the purposes of creating a recovery point, specify the START(QUIESCE) keyword on the appropriate UPDATE command. For example: UPDATE DB NAME(DBXYZ) START(QUIESCE).

When you hold a database in the quiesce state, the database is held in the quiesce state until you release it by issuing the appropriate UPDATE command with the STOP(QUIESCE) keyword. While databases are held in the quiesce state, you can create clean image copies without having to take the database offline by running either an online image copy utility, such as the Database Image Copy 2 utility (DFSUDMT0), or a batch image copy utility, such as the Database Image Copy utility (DFSUDMP0).

To quiesce a database and hold it in the quiesce state, specify both the START(QUIESCE) and OPTION(HOLD) keywords on the appropriate UPDATE command. For example: UPDATE DB NAME(DBXYZ) START(QUIESCE) OPTION(HOLD)

The timeout interval for the quiesce function defines the amount of time that the quiesce function waits for application programs to commit any updates to the database that are in progress when the quiesce function is initiated. If updates remain in progress when the time interval expires, the quiesce of the database is canceled and the appropriate UPDATE command must be reissued with the START(QUIESCE) option to quiesce the database.

The default timeout value for the quiesce function is 30 seconds. You can define a different timeout value for the quiesce function by using the DBQUIESCETO parameter in the DFSCGxxx PROCLIB member. You can override the timeout value when starting the quiesce function by including the SET(TIMEOUT(nnn) parameter on the appropriate UPDATE command.

Impact of quiescing databases on application programs

While a quiesce of a database, area, or partition is in progress or is being held, application programs can be scheduled, but can access the database, area, or partition for reads only. Application programs that need to access the database for an update are held in a wait state until the quiesce is released.

If an application program is updating the database when a quiesce is initiated, the quiesce function waits until the application program commits the updates in progress and the updates are written to DASD. If, after committing the in-progress updates, the application program has more updates for the database, the application program is placed in a wait state until the quiesce is released. If the application program does not commit its updates before the timeout interval specified for the quiesce function expires, the quiesce of the database is canceled.

Holding a database in a quiesce state can cause the number of application programs waiting in dependent regions to increase, potentially causing the number of dependent regions to reach the maximum number allowed by your installation.

To avoid problems associated with a large number of waiting application programs, hold databases in a quiesce state only during periods of low activity and only for as long as is needed to perform required tasks, such as creating an image copy.

DBRC, the RECON data set, and the quiesce function

Although DBRC is not required for the quiesce function, it is highly recommended that any databases that are quiesced are registered with DBRC. If the database is not registered with DBRC when it is quiesced, the quiesce function is not coordinated with other IMS instances, and the database will not stay quiesced across a restart when the HOLD option is used.

To ensure the coordination of the quiesce function in an IMSplex, the DBRC instances that belong to the IMS systems participating in the quiesce function must be in the same DBRC group, as defined by a unique DBRC group ID, and the DBRC instances must be registered with the Structured Call Interface (SCI) of the Common Service Layer (CSL).

DBRC records the quiesce status of a database, DEDB area, or HALDB partition in the RECON data set. When the quiesce function is invoked, DBRC updates the RECON data set to indicate that a quiesce of a database, area, or partition is in progress. When a database, area, or partition is quiesced and then held in the quiesce state, DBRC updates the RECON data set to indicate both that a quiesce of the database, area, or partition is in progress and that the quiesce state is being held.

While a database, area, or partition is being quiesced, a listing of its record in the RECON data set shows QUIESCE IN PROGRESS. While a database, area, or partition is held in a quiesce state, a listing of the record in the RECON data set shows both QUIESCE IN PROGRESS and QUIESCE HELD.

While a quiesce of a database, area, or partition is in progress, but the quiesce state is not being held, DBRC manages authorization and access to the database, area, or partition as follows:

  • Not authorized:
    • Utilities that require an access intent of update or exclusive
    • Image copy utilities
    • Batch application programs with update access
  • Authorized, but cannot access the database, area, or partition:
    • IMS systems that are not participating in the quiesce
    • Online IMS systems that have application programs that have update privileges
  • Authorized and can access the database, area, or partition:
    • Batch application programs with read-only intent
    • Online IMS systems that have application programs that have read-only privileges
    • Utilities that require read-only intent (excluding image copies)

When a database, area, or partition is being held in the quiesce state, DBRC manages database, area, and partition authorization and access as follows:

  • Not authorized:
    • Utilities that require an access intent of update or exclusive
    • Batch application programs with update authority
  • Authorized, but cannot access the database, area, or partition:
    • IMS systems that are not participating in the quiesce
    • Online IMS systems that have application programs that have update authority
  • Authorized and can access the database, area, or partition:
    • Utilities that require read-only access authority
    • Image copy utilities
    • Batch application programs with read-only authority, as specified by a value of G, GO, or GOx on the PROCOPT parameter of the PCB statement for the application program.
    • Online IMS systems that have application programs that have read-only authority

When the database is quiesced, if the database has open ALLOC records in the RECON data set, the ALLOC records are closed with a DEALLOC time stamp that corresponds to the point the quiesce was achieved across the IMSplex. The ALLOC record indicates that the database was deallocated as a result of being quiesced. The DEALLOC time stamp in the closed ALLOC record can then be used as a recovery point for the Database Recovery utility (DFSURDB0) and time stamp recoveries.

When a new ALLOC record is created for the database, area, or partition, a new update set ID (USID) and data set sequence number (DSSN) are assigned.

When the quiesce is released, the database can be accessed again by DL/I calls. For DEDB areas, a new ALLOC record is created in the RECON data set. For full-function databases, a new ALLOC record is not created until the database is accessed by the first update.

Requirements and restrictions for the quiesce function

The database quiesce function requires an IMSplex environment with the following CSL managers enabled.

  • Operations Manager (OM)
  • Resource Manager (RM), unless the IMSplex environment includes only a single IMS system and RMENV=N is specified in either the DFSCGxxx PROCLIB member or the CSL section of the DFSDFxxx PROCLIB member.
  • Structured Call Interface (SCI)

The minimum version specified for the RECON data set must be 11.1 or later by using the MINVERS keyword on the DBRC command CHANGE.RECON.

A quiesce fails to start in any of the following circumstances:

  • A batch application program with update authority is accessing the database when the quiesce function is started; however, a batch application program that has read-only authority does not cause the quiesce function to fail.
  • The database needs to be recovered or backed out.
  • A reorganization intent flag is set in the database, area, or partition record in the RECON data set.
  • The HALDB online reorganization function has been initiated and either the target HALDB partition is in cursor-active state, or an IMS system owns the Online Reorganization function for a partition being quiesced.
  • A quiesce of the database is already in progress.
  • The HALDB partition being quiesced needs to be initialized.
  • Any one of the following commands were issued against the database and have not completed processing.
    • /DBD DB
    • /DBR AREA
    • /DBR DB
    • /INIT OLREORG
    • INIT OLREORG
    • /STA AREA
    • /STA DB
    • /STO AREA
    • /STO DB
    • UPDATE AREA
    • UPDATE DATAGRP
    • UPDATE DB