Distributed relational database SQLCODEs and SQLSTATEs

The list provides some of the common SQLCODEs and SQLSTATEs associated with distributed relational database processing.

In these brief descriptions of the SQLCODEs (and their associated SQLSTATEs), message data fields are identified by an ampersand (&), and a number (for example, &1). The replacement text for these fields is stored in SQLERRM if the application program is using an SQLCA, or in DB2_ORDINAL_TOKEN_n (where n is the token number) if the application program is using the SQL diagnostic area. More detailed cause and recovery information for any SQLCODE can be found by using the Display Message Description (DSPMSGD) command.

Table 1. SQLCODEs and SQLSTATEs
SQLCODE SQLSTATE Description
+100 02000 This SQLSTATE reports a No Data exception warning due to an SQL operation on an empty table, zero rows identified in an SQL UPDATE or SQL DELETE statement, or the cursor in an SQL FETCH statement was after the last row of the result table.
+114 0A001 Relational database name &1; not the same as current server &2;
+304 01515 This SQLSTATE reports a warning on a FETCH or SELECT into a host variable list or structure that occurred because the host variable was not large enough to hold the retrieved value. The FETCH or SELECT does not return the data for the indicated SELECT item, the indicator variable is set to -2 to indicate the return of a NULL value, and processing continues.
+331 01520 Character conversion cannot be performed.
+335 01517 Character conversion has resulted in substitution characters.
+551 01548 Not authorized to object & in &2 type &3.
+552 01542 Not authorized to &1;
+595 01526 Commit level &1; has been escalated to &2; lock.
+802 01519 This SQLSTATE reports an arithmetic exception warning that occurred during the processing of an SQL arithmetic function or arithmetic expression that was in the SELECT list of an SQL select statement, in the search condition of a SELECT or UPDATE or DELETE statement, or in the SET clause of an UPDATE statement. For each expression in error, the indicator variable is set to -2 to indicate the return of a NULL value. The associated data variable remains unchanged, and processing continues.
+863 01539 Only SBCS characters allowed to relational database &1;
+990 01587 This SQLSTATE reports a pending response or a mixed outcome from at least one participant during the two-phase process.
+30104 01615 Bind option ignored.
-114 42961 Relational database &1; not the same as current server &2;
-144 58003 Section number &1; not valid. Current high section number is &3; Reason &2;
-145 55005 Recursion not supported for heterogeneous application server.
-175 58028 The commit operation failed.
-189 22522 Coded Character Set identifier &1; is not valid.
-191 22504 A mixed data value is invalid.
-250 42718 Local relational database not defined in the directory.
-251 2E000 42602 Character in relational database name &1; is not valid.
-300 22024 A NUL-terminated input host variable or parameter did not contain a NUL.
-302 22001 Conversion error on input host variable &2;
-330 22021 Character conversion cannot be performed.
-331 22021 Character conversion cannot be performed.
-332 57017 Character conversion between CCSID &1; and CCSID &2; not valid.
-334 22524 Character conversion resulted in truncation.
-351 -352 56084 An unsupported SQLTYPE was encountered in a select-list or input-list.
-426 2D528 Operation invalid for application run environment. This SQLSTATE reports the attempt to use EXCSQLIMM or EXCSQLSTT to execute a COMMIT in a dynamic COMMIT restricted environment.
-427 2D529 Operation invalid for application run environment.
-501 -502 -507 24501 Execution failed due to an invalid cursor state. The identified cursor is not open.
-510 42828 This SQLSTATE reports an attempt to DELETE WHERE CURRENT OF CURSOR or UPDATE WHERE CURRENT OF CURSOR on a cursor that is fetching rows using a blocking protocol.
-525 51015 Statement is in error.
-551 42501 Not authorized to object &1; in &2; type *&3;
-552 42502 Not authorized to &1;
-683 42842 FOR DATA clause or CCSID clause not valid for specified type.
-752 0A001 Application process is not in a connectable state. Reason code &1;
-802 22003 22012 A numeric value is out of range and division by zero is invalid.
-805 51002 SQL package &1; in &2; not found.
-818 51003 Consistency tokens do not match.
-842 08002 The connection already exists.
-862 55029 Local program attempted to connect to remote relational database.
-871 54019 Too many CCSID values specified.
-900 08003 The connection does not exist.
-918 51021 SQL statements cannot be executed until the application process executes a rollback operation.
-922 42505 This SQLSTATE reports a failure to authenticate the user during connection processing to an application server.
-925 -926 2D521 SQL COMMIT or ROLLBACK statements are invalid in the current environment.
-950 42705 Relational database &1; not in relational directory.
-952 57014 Processing of the SQL statement was ended by ENDRDBRQS command.
-969 58033 Error occurred when passing request to application requester driver program.
-7017 42971 Commitment control is already active to a DDM target.
-7018 42970 COMMIT HOLD or ROLLBACK HOLD is not allowed.
-7021 57043 Local program attempting to run on application server.
-30000 58008 Distributed Relational Database Architecture™ (DRDA®) protocol error.
-30001 57042 Call to distributed SQL program not allowed.
-30020 58009 Distributed Relational Database Architecture (DRDA) protocol error.
-30021 58010 Distributed relational database not supported by remote server.
-30040 57012 DDM resource &2; at relational database &1; unavailable.
-30041 57013 DDM resources at relational database &1; unavailable.
-30050 58011 DDM command &1; is not valid while bind process in progress.
-30051 58012 bind process with specified package name and consistency token not active.
-30052 42932 Program preparation assumptions are incorrect.
-30053 42506 Not authorized to create package for owner&1;
-30060 08004 User not authorized to relational database &1;
-30061 08004 Relational database &1; not found.
-30070 58014 Distributed Data Management (DDM) command &1; not supported.
-30071 58015 Distributed Data Management (DDM) object &1; not supported.
-30072 58016 Distributed Data Management (DDM) parameter &1; not supported.
-30073 58017 Distributed Data Management (DDM) parameter value &1; not supported.
-30074 58018 Distributed Data Management (DDM) reply message &1; not supported.
-30080 08001 Communication error occurred during distributed database processing.
-30082 08001 Authorization failure on distributed database connection attempt.
-30090 25000 2D528 2D529 Change request not valid for read-only application server.
-30104 56095 Invalid bind option. This SQLSTATE reports that one or more bind options were not valid at the server. The bind operation terminates. The first bind option in error is reported in SQLERRMC.
-30105 56096 Conflicting bind options. The bind operation terminates. The bind options in conflict are reported in SQLERRMC.
Unrecognized by AR 58020 SQLSTATE value not defined for the error or warning.
Related information
SQL messages and codes
Display Message Description (DSPMSGD) command