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

-922

Authorization failureNEGATIVE SQLCODE · CHECKED 2026-11-14
Checked against IBM documentation

Authorization failed while connecting to Db2; the error type and reason code say which check failed.

QUICK ANSWER

Authorization failed while connecting to Db2; the error type and reason code say which check failed.

LIKELY CAUSES, IN THE ORDER OF THIS ENTRY

  1. USER AUTHORIZATION: the authorization ID given through the attachment facility is not valid for Db2.
  2. PLAN ACCESS: the ID is not authorized for the plan, or the plan does not exist.
  3. DUPLICATE EXIT: a duplicate exit was requested.
  4. INSTALLATION ERROR: a connection or sign-on exit denied the request.
  5. CONNECT: an SQL CONNECT with USER/USING failed to connect to the local Db2.

CHECKED 14 Nov 2026 IBM: Db2 13 - Codes - SQLCODE -922 | Db2 for z/OS 13.0.0

MOST LIKELY

USER AUTHORIZATION: the authorization ID given through the attachment facility is not valid for Db2.

FIRST CHECK

For user authorization, contact the system programmer or the CICS, IMS or TSO administrator.

TRY IT ▸

Site search

What it means

The statement is not processed and the connection to Db2 is not established. The message names an error type: user authorization, plan access, duplicate exit, installation error or connect.

Typical causes

  • USER AUTHORIZATION: the authorization ID given through the attachment facility is not valid for Db2.
  • PLAN ACCESS: the ID is not authorized for the plan, or the plan does not exist.
  • DUPLICATE EXIT: a duplicate exit was requested.
  • INSTALLATION ERROR: a connection or sign-on exit denied the request.
  • CONNECT: an SQL CONNECT with USER/USING failed to connect to the local Db2.

How to fix it

  1. For user authorization, contact the system programmer or the CICS, IMS or TSO administrator.
  2. For plan access, ask the administrator to authorize the ID for the plan or fix the plan name.
  3. For installation error, see your system programmer about the exit.
  4. Look up the reason code for the failure details.
  5. After a CONNECT failure only CONNECT, COMMIT, ROLLBACK and local SET statements work.