What it means
The connection to Db2 was not made, so no SQL can run. The message gives a condition that says why, for example Db2 not up, Db2 not operational, shutdown in progress, restricted access mode, allocation error, CICS attachment not up, or CICS entry disabled. It also gives a Db2 reason code and, where known, a resource type and name.
An allocation error can mean the plan does not exist, a required database object or data set is not available, there is not enough virtual storage, or the plan is not allowed to run from this environment (see SYSIBM.SYSPLSYSTEM). Running more SQL after -923 gives unpredictable results.
Typical causes
- The Db2 subsystem is stopped, starting, or stopping.
- Db2 is running in restricted access mode (for example started for maintenance).
- The CICS-Db2 attachment is not started, or the DB2ENTRY is disabled.
- The plan named in the job or transaction does not exist or cannot be allocated.
- A required table space, index or data set is unavailable.
How to fix it
- Read the condition text and reason code in the message first.
- Check that the Db2 subsystem is up and not in restricted mode (ask operations or use DISPLAY commands).
- For CICS, check the Db2 connection and the DB2ENTRY status and restart them if needed.
- For an allocation error, check that the plan exists and rebind it; read any accompanying messages.
- Stop the program after -923; do not issue more SQL on the failed connection.
Example
Illustrative only; names and values are invented.
DSNT408I SQLCODE = -923, ERROR: CONNECTION NOT ESTABLISHED: DB2 ALLOCATION ERROR
REASON ..., TYPE ..., NAME MYPLAN