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

-30040

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

A statement or command needed a non-RDB resource that was unavailable; later commands and statements are not affected.

QUICK ANSWER

A statement or command needed a non-RDB resource that was unavailable; later commands and statements are not affected.

LIKELY CAUSES, IN THE ORDER OF THIS ENTRY

  1. The non-RDB resource named in the message was not available; the reason code identifies why.

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

MOST LIKELY

The non-RDB resource named in the message was not available; the reason code identifies why.

FIRST CHECK

Collect the console output of the system named by RDBNAME and the SYSLOG for the failure period.

TRY IT ▸

Site search

What it means

The message gives a reason code, resource type, resource name, product ID and the RDBNAME of the remote server. The statement cannot be processed and the local Db2 is disconnected from the remote server.

Typical causes

  • The non-RDB resource named in the message was not available; the reason code identifies why.

How to fix it

  1. Collect the console output of the system named by RDBNAME and the SYSLOG for the failure period.
  2. Look up the reason code in the Db2 reason codes and collect what it asks for.