Learn it on Mainframe Path. Do it with Mainframe KIT.Learn on Mainframe Path ▸
Mainframe KIT ● Nothing leaves this tab

-904

SQLSTATE 57011NEGATIVE SQLCODE · CHECKED 2026-11-14
Checked against IBM documentation

The SQL statement failed because a resource it needs was unavailable; the reason code says which and why.

QUICK ANSWER

The SQL statement failed because a resource it needs was unavailable; the reason code says which and why.

LIKELY CAUSES, IN THE ORDER OF THIS ENTRY

  1. The resource named in the message was not available when the statement ran.
  2. The Db2 reason code in the message gives the exact cause for that resource.
  3. The optimum buffer pool named as the resource does not exist for the table or table space.

CHECKED 14 Nov 2026 IBM: -904 (Db2 13 for z/OS)

MOST LIKELY

The resource named in the message was not available when the statement ran.

FIRST CHECK

Collect the SYSLOG for the time of the failure and search it for related messages.

TRY IT ▸

Site search

What it means

The message gives a reason code, a resource type and a resource name. The statement cannot be processed, and if it was a cursor FETCH, Db2 closes the cursor.

Resource type 402 means the name field holds z/OS Security Server return and reason codes. When the reason code is 00E7000E and the type is 00001080, the code came from IBM Db2 Analytics Accelerator for z/OS.

Typical causes

  • The resource named in the message was not available when the statement ran.
  • The Db2 reason code in the message gives the exact cause for that resource.
  • The optimum buffer pool named as the resource does not exist for the table or table space.

How to fix it

  1. Collect the SYSLOG for the time of the failure and search it for related messages.
  2. Look up the reason code in the Db2 reason codes and identify the resource from its type and name.
  3. If the resource is the optimum buffer pool, define that buffer pool or create the table in a table space that uses it.
  4. If the Analytics Accelerator issued it, contact IBM Support with the resource-name text.