Dynamic database extension

Overview

The data and key files of product databases can be extended dynamically without having to interrupt normal operations. This enhances the availability of the product and contributes to achieving zero downtime.

To enable dynamic extension, the database definition must specify secondary space or volume candidates or both. The database is extended automatically when used space reaches a critical level (high water mark minus 1 percent).

Multi-CPU

Dynamic database extension is also possible in multi-CPU configurations that use the BQL share option, and in master-slave configurations.

Maximum size: 4 GB or 28 GB

The following applies to BQL databases:

  • The total maximum size of a standard VSAM dataset is 4 GB.
  • To enable extension beyond the 4 GB border, a dataset must be set up as an extended VSAM dataset. This is defined via the SMS data class. The maximum size of an extended VSAM dataset is 28 GB.

Minimum size

The minimum size of a database file is 5 cyl. This minimum value applies to primary space and it applies to secondary space. The minimum size does not apply to the SYNC file, which can be smaller.

Making databases dynamic

To enable dynamic database extension for a new database, do the following when defining the database:

To enable dynamic database extension for an existing database, do one of the following:

Important: An existing VSAM dataset cannot be extended if concatenated datasets (EXT01, EXT02 etc.) are present. Follow the instructions in "Merging concatenated VSAM datasets" in order to merge concatenated VSAM datasets into one dynamic database.

Dynamic extension

A dynamic database is extended automatically when the used space reaches a critical level (high water mark minus 1 percent). It is also possible to trigger dynamic database extension manually via the ISPF application (line command X in the "Dataset Definition Selection" table (option D.1)).

The process of dynamic database extension is indicated by the following messages:

9510I FORMAT OF 'dataset' TYPE: type ACTIVATED
9511I FORMAT OF 'dataset' TYPE: type ENDED SUCCESSFULLY

The dynamic extension of databases is handled within the STC. The database is locked against change requests during formatting. Mirror databases are also extended if present.

Format extend error

The dynamic extension of a database will fail if there is not enough free space on any of the specified volumes.

If dynamic extension fails due to lack of space or other reasons, the database receives the status FEX (Format EXtend Error). The database remains fully functional and work can continue, but the dynamic extension function is disabled for this database while it has the status FEX.

If the error is caused by lack of space on available volumes, create extra space on these volumes or "Adding volumes". Depending on the product, you can also free space in the existing database via the product's cleanup jobs. Afterwards reset the status of the database (line command RX in the "Dataset Definition Selection" table (option D.1)) in order to enable its dynamic extension. The FEX status of the database is also reset when the STC is restarted.

Monitoring growth (MAXSIZE)

It is possible to monitor the growth of dynamic databases by defining a warning threshold. This value is defined in the database definition file via the MAXSIZE(cyl) parameter (see "BST05UPF: Updating file information in the database definition file").

If MAXSIZE is defined for a data or key file, the system will write an additional message after it has terminated the extension of a database file:

9549I nn% OF MAXSIZE - 'dataset' (T: totalblocks M: maxblocks)
9549W DEFINED MAXSIZE (maxblocks/nn%) FOR 'dataset' HAS BEEN REACHED

An informational message is written if the total size of the database is less than MAXSIZE and a warning message is written if it is greater or equal. The warning threshold and the current allocation (in percent) is also displayed online in the "Display Data Set Information" panel (option D.1).

Reaching the MAXSIZE value does not have any impact on the database, which remains fully functional and continues processing.

High water mark

Dynamic databases are extended automatically before used space reaches the high water mark (high water mark minus 1 percent). The occurrence of the high water mark message 9550W HIGH WATER MARK REACHED nn% dsname for a dynamic database indicates that dynamic extension has failed (9512E FORMAT OF 'dataset' TYPE: type FAILED (RC: rc T: tb/hwm%)). The high water mark message will continue to be written while the used space increases until you solve the problem that caused the format extension error and reset the FEX status of the database.

Adding volumes

You can use IDCAMS to add new volumes at any time during active operation, for example:

ALTER TEST.QADOC.DATA
ADDVOLUMES(VOL002 VOL003 VOL004)

When a dataset with secondary space is extended and a new volume comes into use, the primary space is allocated, but only the secondary space is formatted. This may result in a difference between High Used RBA and High Allocated RBA. The next time the database is extended, the difference between High Used and High Allocated is formatted.

You can use line command S under option D.1 to display the High Used RBA and High Allocated RBA of a database. These panels also display how many volumes have been defined and how many unused volumes are still available. See the BSA Service Manager Manual for details.

Making an existing database dynamic

Following is a description of the recommended method for making a database dynamic. This method corresponds to the steps of an ENLARGE job as generated under option 4 of the "Service and Database Selection Menu". You can specify the desired values for primary and secondary space in the corresponding panels. The STC must be down during this operation.

Procedure:

  1. Back up your existing database.
  2. Create a new database using IDCAMS. Specify secondary space to make this database dynamic.
  3. Copy the old database into the new database using IDCAMS REPRO.
  4. Optional: Format added space using BST05FOR with one of the following parameters:

    FORMAT FILE(dsname)

    -OR-

    FORMAT FILE SNAME sname

    where dsname is the dataset name and sname is the short name defined in the database definition file. This step is optional because formatting can also be carried out automatically by the active started task.

Creating a new dynamic database

Specify secondary space for your databases when you run the installation REXX if you want to create dynamic databases. The installation REXX will tailor your installation member S#nnUDEF with values for primary and secondary space accordingly, for example:

SPACE(20,10)

These values will be used by BST05FOR when it allocates and formats the database:

FORMAT FILE DSNAME(dsname)

-OR-

FORMAT FILE SNAME sname

You can later add volumes using IDCAMS (see "Adding volumes").

Alternatively, you can also specify the volumes when you allocate the database using IDCAMS and later format it using BST05FOR:

DEFINE CLUSTER( -
NAME(TEST.QADOC.DATA) -
CYLINDERS(20 10) -
SHAREOPTIONS(3 3) -
VOL(VOL001 VOL002 VOL003) -
OWNER(BETA05) -
UNIQUE -
NONINDEXED -
) -
DATA( -
NAME(TEST.QADOC.DATA.DATA) -
CONTROLINTERVALSIZE(4096) -
RECORDSIZE(4088 4088) -
)