SQLState messages reported by SQL

DB2 | 2006. 4. 5. 17:20
Posted by 시반

SQLState messages reported by SQL

Table 26 lists all of the SQLSTATEs for the SQL statements reported by the DB2 Everyplace SQL engine. The SQLSTATEs reported by DB2 CLI are listed under each DB2 CLI function description in DB2 CLI function summary.

Table 26. SQLSTATE messages reported by SQL

SQLSTATE Description Explanation
01000 Warning. Informational message. (Function returns SQL_SUCCESS_WITH_INFO.)
01004 Value was truncated. The value was truncated by a system cast or adjustment function.
01550 The index was not created. The index was not created, because an index with the specified description already exists.
02000 No row was found. No row was found during the execution of a FETCH, DELETE, or UPDATE statement.
07001 Wrong number of parameters. A parameter marker has not been bound.
07005 Invalid parameter. The statement name of the cursor identifies a prepared statement that cannot be associated with a cursor.
07006 Invalid variable. An input host variable cannot be used because of its data type.
08002 Connection already exists. A connection already exists.
22001 Value requires truncation. A value requires truncation by a system cast or adjustment function.
22002 No null indicator provided. A NULL value cannot be assigned because no storage is provided.
22003 Numeric value out of range. A numeric value is not within the range of its target column.
22007 Invalid datetime format. The syntax of the string representation of a datetime value is incorrect.
22008 Datetime value out of range. The string representation of a datetime value is out of range.
22012 Divide by zero. A divide by zero operation was attempted.
22504 Fragmented MBCS character. The data contains an improperly formed multi-byte character.
23502 Null value not allowed. The assignment of a NULL value to a NOT NULL column is not allowed.
23505 Values are not unique. The operation was not valid because it would produce duplicate keys.
23513 Invalid value. The resulting row of the INSERT or UPDATE statement does not conform to the check constraint definition.
23515 More than one primary key clause is specified. More than one primary key clause is specified.
24000 Invalid cursor state. The StatementHandle was in an executed state but no result set was associated with the StatementHandle.
24501 Cursor not open. A FETCH is not valid because no result set has been generated.
24505 Cursor not positioned. A FETCH is not valid because the cursor is not positioned on a row.
34000 Cursor name is invalid. Cursor name is invalid.
42501* Authorization ID not permitted to perform specified operation on identified object The current user is trying to remove a privilege from a non-existing user.
42502* Authorization ID not permitted to perform operation as specified The current user does not have an authenticated connection. When an application (which does not have the encryption library or the CryptoPlugin.dll) executes an encryption related SQL commands (GRANT, REVOKE and CREATE TABLE) an error of "42502" will be returned. This is to prevent applications from crashing.
42505* Connection authorization failure occurred. A registered user attempts to connect and cannot be authenticated.
42506* Owner authorization failure. The connected user could not be authenticated. (Wrong password.)
42601 Syntax error. A syntax error in the SQL statement was detected.
42603 String constant does not have an ending delimiter. A string constant or delimited identifier does not have an ending delimiter.
42610 Invalid use of a parameter marker. The statement contains a parameter marker that is not valid. See Table 19 for valid usage of parameter markers.
42611 Invalid length specification. A length specification exceeds the limit.
42614 A duplicate keyword is invalid. A duplicate keyword is invalid.
42621 The check constraint is invalid. The check constraint is invalid.
42622 Name is too long. The name of an identifier is too long.
42702 Ambiguous column name reference. There is more than one possible column being referenced.
42703 Undefined column name. A column name is not in the referenced tables.
42704 Undefined object. The table does not exist.
42710 Named object already exists. A table with the same name already exists.
42711 Duplicated column name. The same column name is specified more than once.
42802 Number of values does not match the number of columns. The number of values assigned is not the same as the number of columns specified or implied.
42803 Column reference in SELECT list is not specified in the GROUP BY clause. A column name and an aggregation function are contained in the select list, but there is no GROUP BY clause.
42818 Incompatible data types of operands. The data types of the operands of an operation are not compatible.
42820 Literal value out of range. The specified numeric value is not in the acceptable range.
42821 Incompatible data types. A value is not compatible with the data type of a target column.
42822 Invalid ORDER BY item. The ORDER BY item is not in the select list.
42824 Invalid LIKE operand. An operand of LIKE is not a string, or the first operand is not a column.
42829 FOR UPDATE OF is invalid. FOR UPDATE OF is invalid because the result table designated by the cursor cannot be modified.
42830 The foreign key does not conform to the description of the parent key. The foreign key does not conform to the description of the parent key.
42831 Nullable columns in primary key. A column specified in the primary key clause cannot be nullable.
42832* Unauthorized access to system objects. The operation is not allowed on system objects.
42884 Unknown function name. No function or procedure was found with the specified name and compatible arguments.
42887 Unsupported feature The feature is not supported in the current release.
42894 The DEFAULT value is invalid. The DEFAULT value is invalid.
42902 Duplicate object table reference. The object table of the INSERT statement is also identified in a FROM clause.
42903 A WHERE clause or SET clause includes an invalid reference. A WHERE clause or SET clause includes an invalid reference, such as a column function.
42962 LOB column cannot be used as a key. A LOB column cannot be used as the primary key.
54001 Statement too long. The query statement is too long.
54008 Key is too long. Too many columns in a primary key, foreign key, or index.
54010 Table record length is too long. The record length of the table is too long.
55002 DB2ePLANTABLE not defined properly. EXPLAIN cannot be executed with an incorrect declaration of DB2ePLANTABLE.
55009 File is read-only. The file is read-only. In a read-only environment, only SELECT queries can be executed.
57001 Table not available. REORG cannot be executed on a table that is under a transaction scope.
57011 Out of memory. The system is not able to allocate dynamic memory.
57014 Processing was cancelled due to an interrupt. The execution of a query is canceled due to user interruption.
58004 Internal system error (continue). A non-severe system error occurred.
58005 Internal system error (stop). A severe system error occurred.

 

Related reference

 
블로그 이미지

시반

시반(詩伴)이란 함께 시를 짓는 벗이란 뜻을 가지고 있습니다. 함께 나눌수 있는 그런 공간이길 바라며...

카테고리

분류 전체보기 (233)
개발 이야기 (73)
WEB2.0 (57)
DB2 (24)
MySQL (6)
오라클 (26)
기타 (44)
취미 (0)
잡담 (2)