Adabas On Read-only Devices

Adabas databases can reside on read-only devices. If at least ASSO1 is located on a read-only device, the whole database is treated as read-only.

This document covers the following topics:


Restrictions when using the Adabas Nucleus

For read-only databases, there are several restrictions concerning the use of the Adabas nucleus.

A nucleus runs in read-only mode if ASSO1 is located on a read-only device, or if ASSO1 cannot be opened for writing, or if the nucleus session is started with the Adabas nucleus parameter OPTIONS=READONLY. In the first case, the nucleus switches automatically to read-only mode, regardless of the setting of the OPTIONS parameter. The second case can be used to run a nucleus session in read-only mode if the database is not located on a read-only device.

A pending autorestart check is always done when a writeable WORK container is specified. If an autorestart is pending, a read-only database session cannot be started.

If the nucleus is started in read-only mode, the database ID that is given as a startup parameter is not checked against the ID of the real database. Instead, the environment variable settings for the database container files identify the database. This means that a read-only database can run with any valid database ID. Therefore, when starting the nucleus or a utility, any number can be assigned to the database ID parameter. Applications that communicate with the nucleus must use this number to access the database.

Databases which are partially read-only and for which ASSO1 is writeable are not supported by Adabas.

READONLY option

If the nucleus parameter OPTION=READONLY is set, the nucleus runs in read-only mode. The database can be located on a read-only or on a writeable device. If ASSO1 is on a read-only device, ADANUC will automatically switch to read-only mode, even if the parameter OPTION=READONLY is not set. In this case, a warning message will be displayed.

The read-only mode causes

  • update commands (A1, E1, N1, N2) to be disabled

  • checkpoint writing to be disabled (C1 and utility / EXU checkpoints)

  • logging to be disabled (start of nucleus with NOPLOG is required)

  • the hold logic to become inactive (The commands L4, L5, L6, S4 are accepted, but have no effect on the hold queue, i.e. they work exactly like L1, L2, L3, S1, respectively. The commands BT, ET, HI, RI are accepted but have no effect).

  • ET/CL commands with user data to be forbidden

All file open modes that can be specified in the OP command are allowed and therefore all permitted user types are also allowed. Note, however, that exclusive control users do not write OPEN and CLSE checkpoints.

The session number is not increased by a nucleus session running in read-only mode. Command logs are still supported but the command log number is not increased.

For the WORK container there are two options:

  1. Although not required, there is a WORK container.

  2. There is no WORK. In this case, the environment variable WORK1 must be set to "READONLY".

Restrictions when using Adabas Utilities

A utility can process a read-only database if a nucleus with the specified database ID is running in read-only mode or if the ASSO1 container file is located on a read-only device. In neither case is the database ID that is given as a parameter checked against the real database ID (same as for nucleus processing described above). However, to enable communication between a running nucleus and utility, they must be started with the same database ID (which may differ from the stored ID of the database).

Note that if the database IDs specified for the nucleus and the utility are different, the communication link fails and the utility runs in offline mode on the same database as the nucleus.

A pending autorestart check is always done when a writeable WORK container is specified. If the WORK1 environment variable is set to READONLY, the ASSO1 container must be located on a read-only device or the nucleus must be running with OPTIONS=READONLY, otherwise the utility will be terminated with the error message RDONP ("Dataset WORK1, READONLY is not permitted").

Some utilities cannot be used with a read-only database, since their purpose is to modify the database. The open database calls for these utilities are terminated with the error message UNPRRD ("Readonly database, utility not permitted to run"). The utilities for which this applies are:

  • ADACVT

  • ADADBM

  • ADAFDU

  • ADAREC

For other utilities, the function set is restricted. These utilities display the warning RONLYDB ("Readonly database, some functions disabled").

The following utilities are affected:

  • ADABCK: the RESTORE and OVERLAY functions cannot be used.

  • ADAINV: only the SUMMARY and VERIFY functions can be used.

  • ADAMUP: only the SUMMARY function can be used.

  • ADAORD: only the EXPORT function can be used.

  • ADAOPR:

    • the LOCK and UNLOCK functions cannot be used.

    • FEOF=CLOG is possible, but the increased CLOG number will not be propagated to the next nucleus session, i.e., all subsequent read-only nucleus sessions will start with the same CLOG number.

  • ADASCR: only the DISPLAY function can be used.

When the nucleus runs in read-only mode, or utilities are executed against a database for which ASSO1 resides on a read-only device, they do not check the database ID given as a parameter against that of the database. However, to enable communication between the nucleus and the utilities, they must be started with the same database ID (which may differ from that stored in the database).

Read-only raw sections are not supported.