Use your browser's Print command for a paper or PDF copy. Open the full Db2 SQLCODEs list.
| Code | Kind | What it means | IBM source | Checked |
|---|---|---|---|---|
| -805Package not found in plan | Negative SQLCODE | An application used a package that Db2 could not find in the plan. The reason code in the message says which search failed. | Db2 13 for z/OS: SQLCODE -805 (Db2 for z/OS 13.0.0) | |
| -803Duplicate values would violate a unique index | Negative SQLCODE | An insert or update would create duplicate values in columns that a unique index, primary key, unique constraint or hash key requires to be unique. | Db2 13 for z/OS: SQLCODE -803 (Db2 for z/OS 13.0.0) | |
| -551Authorization ID lacks the privilege for the operation | Negative SQLCODE | The authorization IDs or roles checked were not authorized to perform the named operation on the named object. The object may also be missing or a read-only view. | Db2 13 for z/OS: SQLCODE -551 (Db2 for z/OS 13.0.0) | |
| -818Load module and package timestamps differ | Negative SQLCODE | The precompiler timestamp in the application load module does not match the bind timestamp stored from the DBRM, so the SQL statement cannot run. | Db2 13 for z/OS: SQLCODE -818 (Db2 for z/OS 13.0.0) | |
| -532Delete restricted by a referential constraint | Negative SQLCODE | A DELETE failed because a dependent row exists in a relationship with a RESTRICT or NO ACTION delete rule, directly or through a cascade. | Db2 13 for z/OS: SQLCODE -532 (Db2 for z/OS 13.0.0) | |
| -180Datetime value is invalid | Negative SQLCODE | The length or string form of a DATE, TIME or TIMESTAMP value does not match any valid format. | Db2 13 for z/OS: SQLCODE -180 (Db2 for z/OS 13.0.0) | |
| -302Input variable or parameter invalid or too large | Negative SQLCODE | A host variable or parameter value is invalid or too large for the column or target value it is assigned to. | Db2 13 for z/OS: SQLCODE -302 (Db2 for z/OS 13.0.0) | |
| -530Foreign key value invalid | Negative SQLCODE | An insert or update put a value in a foreign key that does not equal any parent key value in the parent table. | Db2 13 for z/OS: SQLCODE -530 (Db2 for z/OS 13.0.0) | |
| -181Datetime string not valid | Negative SQLCODE | The string form of a datetime value is out of range or in the wrong format. IBM's page lists the allowed ranges. | Db2 13 for z/OS: SQLCODE -181 (Db2 for z/OS 13.0.0) | |
| -303Data types not compatible for assignment | Negative SQLCODE | A value could not be assigned to an output variable because the variable's data type is not compatible with the source value's type. | Db2 13 for z/OS: SQLCODE -303 (Db2 for z/OS 13.0.0) | |
| -923Connection not established | Negative SQLCODE | The connection to Db2 failed. The message gives a condition, a reason code and the resource involved. | Db2 13 for z/OS: SQLCODE -923 (Db2 for z/OS 13.0.0) | |
| +100Row not found or end of data | Positive SQLCODE (informational) | No row was found: an empty result, nothing matching an UPDATE or DELETE, or a FETCH past the last row. No data was retrieved, updated or deleted. | Db2 13 for z/OS: SQLCODE +100 (Db2 for z/OS 13.0.0) | |
| +304Value does not fit the host variable | Positive SQLCODE (warning) | A FETCH or SELECT could not return a value because the host variable is too small. Processing continues with a null indicator. | Db2 13 for z/OS: SQLCODE +304 (Db2 for z/OS 13.0.0) | |
| +802Arithmetic exception during an operation | Positive SQLCODE (warning) | An arithmetic operation or built-in function failed on one expression. The indicator is set to -2 and the statement continues. | Db2 13 for z/OS: SQLCODE +802 (Db2 for z/OS 13.0.0) | |
| +551Authorization missing for the object or operation | Positive SQLCODE (warning) | At bind time the authorization ID lacked a privilege, or the object was missing or read-only; the package is still created and the statement is bound at each run. | Db2 13 - Codes - SQLCODE +551 | Db2 for z/OS 13.0.0 | |
| -204Undefined name | Negative SQLCODE | The object named in the message is not defined in the Db2 subsystem. It can apply to any type of Db2 object. | Db2 13 for z/OS: SQLCODE -204 (Db2 for z/OS 13.0.0) | |
| -407Null assigned to a NOT NULL column | Negative SQLCODE | A NULL was assigned to a NOT NULL column, or a NOT NULL column without a default was left out of the INSERT or view. | Db2 13 - Codes - SQLCODE -407 | Db2 for z/OS 13.0.0 | |
| -440No routine found for the name and arguments | Negative SQLCODE | Db2 could not resolve a routine call, including its argument list, to an authorized routine definition. | Db2 13 - Codes - SQLCODE -440 | Db2 for z/OS 13.0.0 | |
| -504Cursor name is not declared | Negative SQLCODE | A statement refers to a cursor that has not been declared or allocated, or that was deallocated or is out of scope. | Db2 13 - Codes - SQLCODE -504 | Db2 for z/OS 13.0.0 | |
| -905Resource limit exceeded | Negative SQLCODE | The statement was stopped because a resource limit, such as ASUTIME CPU time, was exceeded. | Db2 13 - Codes - SQLCODE -905 | Db2 for z/OS 13.0.0 | |
| -922Authorization failure | Negative SQLCODE | Authorization failed while connecting to Db2; the error type and reason code say which check failed. | Db2 13 - Codes - SQLCODE -922 | Db2 for z/OS 13.0.0 | |
| -927Language interface called while not connected to Db2 | Negative SQLCODE | A Db2 program was run without the correct execution environment or without the right language interface module. | Db2 13 - Codes - SQLCODE -927 | Db2 for z/OS 13.0.0 | |
| -104Illegal symbol in SQL statement | Negative SQLCODE | Db2 hit a symbol it did not expect while reading the SQL statement. The real mistake is often earlier than the symbol it names. | Db2 12 for z/OS Codes: -104 | |
| -901Unsuccessful execution due to a system error | Negative SQLCODE | A system error stopped this one SQL statement from running. Later statements in the same program can still work. | Db2 12 for z/OS Codes: -901 | |
| -206Name not valid in the context where it is used | Negative SQLCODE | A name is used where it is not valid, most often a column that is not in any table or view referenced by the statement. | Db2 13 for z/OS: SQLCODE -206 (Db2 for z/OS 13.0.0) | |
| -305Null value fetched with no indicator variable (SQLSTATE 22002) | Negative SQLCODE | A FETCH, SELECT INTO, VALUES INTO or SET assignment returned NULL for a host variable that has no indicator variable, so the statement fails. | Db2 12 for z/OS Codes: -305 | |
| -311Host variable length negative or too large | Negative SQLCODE | An input host string variable had a length that was negative or above the allowed maximum, so the statement could not run. | Db2 12 for z/OS Codes: -311 | |
| -122Column or expression in the select list is not valid | Negative SQLCODE | A select list mixes plain columns or expressions with grouping, but they are not all covered by GROUP BY, so Db2 rejects the statement. | Db2 13 for z/OS Codes: -122 | |
| -503Column cannot be updated: not in the cursor's FOR UPDATE clause | Negative SQLCODE | A positioned UPDATE through a cursor named a column that the cursor's FOR UPDATE clause did not list, so no data was changed. | Db2 13 for z/OS Codes: -503 | |
| -508Cursor is not positioned on a row that can be updated or deleted | Negative SQLCODE | UPDATE or DELETE WHERE CURRENT OF ran while the cursor was not on a row of the table, so nothing was changed. | Db2 13 for z/OS Codes: -508 | |
| -788Same target row identified more than once in a MERGE | Negative SQLCODE | In a MERGE, one row of the target table matched several rows of the source, so it would be changed more than once and Db2 stops the statement. | Db2 13 for z/OS Codes: -788 | |
| -811SQLSTATE 21000 | Negative SQLCODE | An embedded SELECT, a subselect in an UPDATE SET clause, or a basic-predicate subquery returned more than one row or value. | Db2 13 - Codes - SQLCODE -811 | Db2 for z/OS 13.0.0 | |
| -911SQLSTATE 40001 | Negative SQLCODE | The unit of work was rolled back after being the victim of a deadlock or a timeout. | Db2 13 - Codes - SQLCODE -911 | Db2 for z/OS 13.0.0 | |
| -913SQLSTATE 57033 | Negative SQLCODE | The statement failed because the application was the victim of a deadlock or experienced a timeout. | Db2 13 - Codes - SQLCODE -913 | Db2 for z/OS 13.0.0 | |
| -904SQLSTATE 57011 | Negative SQLCODE | The SQL statement failed because a resource it needs was unavailable; the reason code says which and why. | -904 (Db2 13 for z/OS) | |
| -501SQLSTATE 24501 | Negative SQLCODE | A FETCH or CLOSE named a cursor that is not open. | -501 (Db2 13 for z/OS) | |
| -433SQLSTATE 22001 | Negative SQLCODE | A value had to be cut short by a built-in cast or adjustment function, and truncation is not allowed where that value is used. | -433 (Db2 13 for z/OS) | |
| -552SQLSTATE 42502 | Negative SQLCODE | An authorization ID attempted an operation it has not been granted the authority to perform. | -552 (Db2 13 for z/OS) | |
| -30040SQLSTATE 57012 | Negative SQLCODE | A statement or command needed a non-RDB resource that was unavailable; later commands and statements are not affected. | -30040 (Db2 13 for z/OS) |
Suggest a tool or report a wrong answer · How it works and why it is safe
No mail app opens? Write to hello@mainframepath.com . Please do not send confidential code or data.