Вы находитесь на странице: 1из 44

DB2 SQLSTATE (values and common error codes)

DB2 produces SQLSTATE values when it works as an application server or requester. The SQLSTATE values are based on the SQLSTATE specifications contained in the standards: ISO/IEC 9075:1992, Database Language SQL and ANSI X3.135-1992 Database Language SQL. SQLSTATE values are returned to the application in the last five bytes of the SQLCA. Each five-character value is a return code that indicates the outcome of the most recently executed SQL statement. SQLSTATE values are designed so that application programs can test for specific errors or classes of errors. The first character of an SQLSTATE value indicates whether the SQL statement was executed successfully or unsuccessfully (equal to or not equal to zero, respectively). SQLSTATE values are comprised of a two-character class code value, followed by a three-character subclass code value. Class code values represent classes of successful and unsuccessful execution conditions. An application might define classes beginning with the characters '7' through '9' or 'I' through 'Z' and subclasses for any class beginning with the characters 'I' through 'Z'. Table 1 identifies the SQLSTATE class codes. Subsequent tables describe the subcodes for each class code. Table 1. SQLSTATE Class Codes Class Code 00 01 02 07 08 09 0A 0F 0K 0N Meaning For subcodes, refer to...

Unqualified Successful Completion Warning No Data Dynamic SQL Error Connection Exception Triggered Action Exception Feature Not Supported Invalid Token Resignal When Handler Not Active SQL/XML Mapping Error

Table 2 Table 3 Table 4 Table 5 Table 6 Table 7 Table 8 Table 9 Table 10 Table 11

1 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 1. SQLSTATE Class Codes Class Code 10 20 21 22 23 24 25 26 2D 34 35 36 37 38 39 3B 3C 40 42 44 XQuery Error Case Not Found for Case Statement Cardinality Violation Data Exception Constraint Violation Invalid Cursor State Invalid Transaction State Invalid SQL Statement Identifier Invalid Transaction Termination Invalid Cursor Name Invalid Condition Number Cursor Sensitivity Exception Syntax Error (OBSOLETE) External Function Exception External Function Call Exception Savepoint Exception Ambiguous Cursor Name Transaction Rollback Syntax Error or Access Rule Violation WITH CHECK OPTION Violation Meaning For subcodes, refer to...

Table 12 Table 13 Table 14 Table 15 Table 16 Table 17 Table 18 Table 19 Table 20 Table 21 Table 22 Table 23 Table 24 Table 25 Table 26 Table 27 Table 28 Table 29 Table 30 Table 31
2 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 1. SQLSTATE Class Codes Class Code 46 51 53 54 55 56 57 58 5U Java Errors Invalid Application State Invalid Operand or Inconsistent Specification SQL or Product Limit Exceeded Object Not in Prerequisite State Miscellaneous SQL or Product Error Resource Not Available or Operator Intervention System Error Common Utilities and Tools Meaning For subcodes, refer to...

Table 32 Table 33 Table 34 Table 35 Table 36 Table 37 Table 38 Table 39 Table 40

Table 2. Class Code 00: Unqualified Successful Completion SQLSTATE Value 00000 Meaning

Execution of the operation was successful and did not result in any type of warning or exception condition.

Table 3. Class Code 01: Warning SQLSTATE Value 01xxx 01003 01004 01005 0100C Meaning

Valid warning SQLSTATEs returned by an SQL routine. Also used for RAISE_ERROR and SIGNAL. Null values were eliminated from the argument of an aggregate function. The value of a string was truncated when assigned to another string data type with a shorter length. Insufficient number of entries in an SQLDA. One or more ad hoc result sets were returned from the procedure.

3 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 3. Class Code 01: Warning SQLSTATE Value 0100E 01011 01503 01504 01505 01506 The procedure returned too many result sets. The PATH value has been truncated. Array data, right truncation. The number of result columns is larger than the number of variables provided. The UPDATE or DELETE statement does not include a WHERE clause. The statement was not executed because it is unacceptable in this environment. An adjustment was made to a DATE or TIMESTAMP value to correct an invalid date resulting from an arithmetic operation. One or more non-zero digits were eliminated from the fractional part of a number used as the operand of a multiply or divide operation. The tablespace has been placed in the check-pending state. The null value has been assigned to a variable, because the non-null value of the column is not within the range of the variable. An inapplicable WITH GRANT OPTION has been ignored. A character that could not be converted was replaced with a substitute character. The null value has been assigned to a variable, because a numeric value is out of range. The null value has been assigned to a variable, because the characters cannot be converted. A specified server-name is undefined but is not needed until the statement is executed or the alias is used. The local table or view name used in the CREATE ALIAS statement is undefined. ALL was interpreted to exclude ALTER, INDEX, REFERENCES, and TRIGGER, because these privileges cannot be granted to a remote user. The result of an aggregate function does not include the null values that were caused by evaluating the arithmetic expression implied by the column of the view. The number of INSERT values is not the same as the number of columns.
4 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Meaning

01507

01514 01515

01516 01517 01519 01520 01521

01522 01523

01524

01525

Table 3. Class Code 01: Warning SQLSTATE Value Meaning

01527 01528 01530 01532 01533 01537 01538

A SET statement references a special register that does not exist at the AS. WHERE NOT NULL is ignored, because the index key cannot contain null values. Definition change may require a corresponding change on the read-only systems. An undefined object name was detected. An undefined column name was detected. An SQL statement cannot be EXPLAINed, because it references a remote object. The table cannot be subsequently defined as a dependent, because it has the maximum number of columns. Connection is successful but only SBCS characters should be used. A limit key has been truncated to 40 bytes. Authorization ID does not have the privilege to perform the operation as specified. A duplicate constraint has been ignored. An unqualified column name has been interpreted as a correlated reference. A column of the explanation table is improperly defined. The authorization ID does not have the privilege to perform the specified operation on the identified object. A table in a partitioned tablespace is not available, because its partitioned index has not been created. An ambiguous qualified column name was resolved to the first of the duplicate names in the FROM clause. Isolation level RR conflicts with a tablespace locksize of page.

01539 01540 01542 01543 01545 01546 01548

01551

01552

01553

5 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 3. Class Code 01: Warning SQLSTATE Value 01554 01558 01560 01561 01565 Decimal multiplication may cause overflow. A distribution protocol has been violated. A redundant GRANT has been ignored. An update to a data capture table was not signaled to the originating subsystem. The null value has been assigned to a variable, because a miscellaneous data exception occurred; for example, the character value for the CAST, DECIMAL, FLOAT, or INTEGER scalar function is invalid; a floating-point NAN (not a number) or invalid data in a packed decimal field was detected. The index has been placed in a pending state. The dynamic SQL statement ends with a semicolon. Type 2 indexes do not have subpages. The result of the positioned UPDATE or DELETE may depend on the order of the rows. Insufficient number of entries in an SQLDA for ALL information (i.e. not enough descriptors to return the distinct name). Comparison functions were not created for a distinct type based on a long string data type. Specific and non-specific volume IDs are not allowed in a storage group. SUBPAGES ignored on alter of catalog index. Optimization processing encountered a restriction that might have caused it to produce a sub-optimal result. A recursive common table expression may contain an infinite loop. An unsupported value has been replaced. There are fewer locators than the number of result sets. The estimated CPU cost exceeds the resource limit. Meaning

01566 01568 01590 01591 01594

01596 01597 01600 01602

01605 01608 01614 01616

6 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 3. Class Code 01: Warning SQLSTATE Value 01624 01625 01628 01629 01640 Meaning

The GBPCACHE specification is ignored because the buffer pool does not allow caching. The schema name appears more than once in the CURRENT PATH. The user-specified access path hints are invalid. The access path hints are ignored. User-specified access path hints were used during access path selection. ROLLBACK TO SAVEPOINT occurred when there were uncommitted INSERTs or DELETEs that cannot be rolled back. Assignment to SQLCODE or SQLSTATE variable does not signal a warning or error. DEFINE NO is not applicable for a lob space or data sets using the VCAT option. ROLLBACK TO savepoint caused a NOT LOGGED table space to be placed in the LPL. Binary data is invalid for DECRYPT_CHAR and DECYRYPT_DB. A non-atomic statement successfully processed all requested rows with one or more warning conditions. NOT PADDED clause is ignored for indexes created on auxiliary tables. Option not specified following the ALTER PARTITION CLAUSE. The last partition's limit key value is set to the highest or lowest possible value. A rowset FETCH statement returned one or more rows of data, with one or more bind out processing error conditions. Use GET DIAGNOSTICS for more information. A trusted connection cannot be established for the specified system authorization ID. The option is not supported in the context in which it was specified. The trusted context is no longer defined to be used by specific attribute value. The ability to use the trusted context was removed from some but not all authorization IDs specified in statement.

01643 01644 01656 01658 01659

01663 01664 01666 01668

01679 01680 01681 01682

7 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 3. Class Code 01: Warning SQLSTATE Value 01683 Meaning

A SELECT containing a non-ATOMIC data change statement successfully returned some rows, but one or more warnings or errors occurred. An operation was partially successful and partially unsuccessful. Use GET DIAGNOSTICS for more information. A decimal float operation produced an inexact result. A decimal floating point operation was invalid. A decimal float operation produced an overflow or underflow. A decimal float operation produced division by zero. A decimal float operation produced a subnormal number. No routine was found with the specified name and compatible arguments. WITH ROW CHANGE COLUMNS ALWAYS DISTINCT was specified, but the database manager is unable to return distinct row change columns. The combination of target namespace and schema location hint is not unique in the XML schema repository. The statement was successfully prepared, but cannot be executed. A deprecated feature has been ignored. Adjustment made to a value for a period as a result of a data change operation. Valid warning SQLSTATEs returned by a user-defined function, external procedure CALL, or command invocation.

0168B

0168C 0168D 0168E 0168F 0168G 0168L 0168T

0168X

0168Z 01694 01695 01Hxx

Table 4. Class Code 02: No Data SQLSTATE Value 02000 One of the following exceptions occurred: Meaning

The result of the SELECT INTO statement or the subselect of the INSERT statement was an empty table.

8 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 4. Class Code 02: No Data SQLSTATE Value Meaning


02502 02504

The number of rows identified in the searched UPDATE or DELETE statement was zero. The position of the cursor referenced in the FETCH statement was after the last row of the result table. The fetch orientation is invalid.

Delete or update hole detected. FETCH PRIOR ROWSET returned a partial rowset.

Table 5. Class Code 07: Dynamic SQL Error SQLSTATE Value 07001 07002 07003 Meaning

The number of variables is not correct for the number of parameter markers. The call parameter list or control block is invalid. The statement identified in the EXECUTE statement is a select-statement, or is not in a prepared state. The statement name of the cursor identifies a prepared statement that cannot be associated with a cursor. The option specified on PREPARE is not valid.

07005

07501

Table 6. Class Code 08: Connection Exception SQLSTATE Value 08001 08002 08003 08004 Meaning

The connection was unable to be established to the application server or other server. The connection already exists. The connection does not exist. The application server rejected establishment of the connection.

9 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 7. Class Code 09: Triggered Action Exception SQLSTATE Value 09000 A triggered SQL statement failed. Meaning

Table 8. Class Code 0A: Feature Not Supported SQLSTATE Value 0A001 Meaning

The CONNECT statement is invalid, because the process is not in the connectable state.

Table 9. Class Code 0F: Invalid Token SQLSTATE Value 0F001 Meaning

The locator value does not currently represent any value.

Table 10. Class Code 0K: Resignal When Handler Not Active SQLSTATE Value 0K000 Meaning

A RESIGNAL was issued but a handler is not active.

Table 11. Class Code 0N: SQL/XML Mapping Error SQLSTATE Value 0N002 Meaning

A character cannot be mapped to a valid XML character.

Table 12. Class Code 10: XQuery Error SQLSTATE Value 10501 10502 10503 Meaning

An XQuery expression is missing the assignment of a static or dynamic context component. An error was encountered in the prolog of an XQuery expression. A duplicate name was defined in an XQuery or XPath expression.

10 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 12. Class Code 10: XQuery Error SQLSTATE Value 10504 10505 10506 10507 10509 10601 10602 10606 10608 Meaning

An XQuery namespace declaration specified an invalid URI. A character, token or clause is missing or invalid in an XQuery expression. An XQuery expression references a name that is not defined. A type error was encountered processing an XPath or XQuery expression. An unsupported XQuery language feature is specified. An arithmetic error was encountered processing an XQuery function or operator. A casting error was encountered processing an XQuery function or operator. There is no context item for processing an XQuery function or operator. An error was encountered in the argument of an XQuery function or operator.

Table 13. Class Code 20: Case Not Found for Case Statement SQLSTATE Value 20000 Meaning

The case was not found for the CASE statement.

Table 14. Class Code 21: Cardinality Violation SQLSTATE Value 21000 Meaning

The result of a SELECT INTO, scalar fullselect, or subquery of a basic predicate is more than one value. A multiple-row INSERT into a self-referencing table is invalid. A multiple-row UPDATE of a primary key is invalid.

21501 21502

11 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 15. Class Code 22: Data Exception SQLSTATE Value 22001 Meaning

Character data, right truncation occurred; for example, an update or insert value is a string that is too long for the column, or a datetime value cannot be assigned to a variable, because it is too small. A null value, or the absence of an indicator parameter was detected; for example, the null value cannot be assigned to a variable, because no indicator variable is specified. A numeric value is out of range. A null value is not allowed. An invalid datetime format was detected; that is, an invalid string representation or value was specified. Datetime field overflow occurred; for example, an arithmetic operation on a date or timestamp has a result that is not within the valid range of dates. The XML value is not a well-formed document with a single root element. The XML document is not valid. The XML comment is not valid. The XML processing instruction is not valid. A context item is an XML sequence of more than one item. An XML value contained data that could not be serialized. A substring error occurred; for example, an argument of SUBSTR or SUBSTRING is out of range. Division by zero is invalid. The character value for a CAST specification or cast scalar function is invalid. The LIKE predicate has an invalid escape character. The XML document is not valid. A character is not in the coded character set or the conversion is not supported.

22002

22003 22004 22007

22008

2200L 2200M 2200S 2200T 2200V 2200W 22011 22012 22018 22019 2201R 22021

12 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 15. Class Code 22: Data Exception SQLSTATE Value 22023 22024 22025 22501 22502 22503 22504 22505 22506 A parameter or variable value is invalid. A NUL-terminated input host variable or parameter did not contain a NUL. The LIKE predicate string pattern contains an invalid occurrence of an escape character. The length control field of a variable length string is negative or greater than the maximum. Signalling NaN was encountered. The string representation of a name is invalid. A mixed data value is invalid. The local date or time length has been increased, but the executing program relies on the old length. A reference to a datetime special register is invalid, because the clock is malfunctioning or the operating system time zone parameter is out of range. CURRENT PACKAGESET is blank. ADT length exceeds maximum column length. The value for a ROWID or reference column is not valid. A variable in a predicate is invalid, because its indicator variable is negative. A CCSID value is not valid at all, not valid for the data type or subtype, or not valid for the encoding scheme. Partitioning key value is not valid. Invalid input data detected for a multiple-row insert. Binary data is invalid for DECRYPT_CHAR and DECYRYPT_DB. A non-atomic statement successfully completed for at least one row, but one or more errors occurred. A non-atomic statement attempted to process multiple rows of data, but no row was inserted and one or more errors occurred. Meaning

22508 22511

22512 22522

22525 22527 22528 22529

22530

13 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 15. Class Code 22: Data Exception SQLSTATE Value 22531 22532 22533 22534 Meaning

The argument of a built-in or system provided routine resulted in an error. An XSROBJECT is not found in the XML schema repository. A unique XSROBJECT could not be found in the XML schema repository. An XML schema document is not connected to the other XML schema documents using an include or redefine. A rowset FETCH statement returned one or more rows of data, with one or more non-terminating error conditions. Use GET DIAGNOSTICS for more information. The binary XML value contains unrecognized data. The INSERT or UPDATE in not allowed because a resulting row does not satisfy row permissions. The binary XML value contains a version that is not supported. An XML schema cannot be enabled for decomposition.

22537

22541 22542 22544 225DE

Table 16. Class Code 23: Constraint Violation SQLSTATE Value 23502 23503 23504 23505 23506 23507 23508 23509 Meaning

An insert or update value is null, but the column cannot contain null values. The insert or update value of a foreign key is invalid. The update or delete of a parent key is prevented by a NO ACTION update or delete rule. A violation of the constraint imposed by a unique index or a unique constraint occurred. A violation of a constraint imposed by an edit or validation procedure occurred. A violation of a constraint imposed by a field procedure occurred. A violation of a constraint imposed by the DDL Registration Facility occurred. The owner of the package has constrained its use to environments which do not include that of the
14 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 16. Class Code 23: Constraint Violation SQLSTATE Value application process. 23510 23511 23512 A violation of a constraint on the use of the command imposed by the RLST table occurred. A parent row cannot be deleted, because the check constraint restricts the deletion. The check constraint cannot be added, because the table contains rows that do not satisfy the constraint definition. The resulting row of the INSERT or UPDATE does not conform to the check constraint definition. The unique index could not be created or unique constraint added, because the table contains duplicate values of the specified key. The range of values for the identity column or sequence is exhausted. An invalid value has been provided for the SECURITY LABEL column. A violation of a constraint imposed by an XML values index occurred. An XML values index could not be created because the table data contains values that violate a constraint imposed by the index. Meaning

23513 23515

23522 23523 23525 23526

Table 17. Class Code 24: Invalid Cursor State SQLSTATE Value 24501 24502 24504 24506 24510 24512 The identified cursor is not open. The cursor identified in an OPEN statement is already open. The cursor identified in the UPDATE, DELETE, SET, or GET statement is not positioned on a row. The statement identified in the PREPARE is the statement of an open cursor. An UPDATE or DELETE operation was attempted against a delete or update hole The result table does not agree with the base table. Meaning

15 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 17. Class Code 24: Invalid Cursor State SQLSTATE Value 24513 Meaning

FETCH NEXT, PRIOR, CURRENT, or RELATIVE is not allowed, because the cursor position is not known. A cursor has already been assigned to a result set. A cursor was left open by an external function or method. A cursor is not defined to handle row sets, but a rowset was requested. A hole was detected on a multiple-row FETCH statement, but indicator variables were not provided. The cursor identified in the UPDATE or DELETE statement is not positioned on a rowset. A positioned DELETE or UPDATE statement specified a row of a rowset, but the row is not contained within the current rowset. The fetch orientation is inconsistent with the definition of the cursor and whether rowsets are supported for the cursor. A FETCH CURRENT CONTINUE was requested, but there is no truncated LOB or XML data to return.

24516 24517 24518 24519 24520 24521

24522

24524

Table 18. Class Code 25: Invalid Transaction State SQLSTATE Value 25000 Meaning

An insert, update, or delete operation or procedure call is invalid in the context where it is specified.

Table 19. Class Code 26: Invalid SQL Statement Identifier SQLSTATE Value 26501 The statement identified does not exist. Meaning

16 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 20. Class Code 2D: Invalid Transaction Termination SQLSTATE Value 2D521 2D528 Meaning

SQL COMMIT or ROLLBACK are invalid in the current operating environment. Dynamic COMMIT or COMMIT ON RETURN procedure is invalid for the application execution environment Dynamic ROLLBACK is invalid for the application execution environment.

2D529

Table 21. Class Code 34: Invalid Cursor Name SQLSTATE Value 34000 Cursor name is invalid. Meaning

Table 22. Class Code 35: Invalid Condition Number SQLSTATE Value 35000 Condition number is invalid. Meaning

Table 23. Class Code 36: Cursor Sensitivity Exception SQLSTATE Value 36001 Meaning

A SENSITIVE cursor cannot be defined for the specified select-statement.

Table 24. Class Code 37: Syntax Error (OBSOLETE) SQLSTATE Value 37520 Meaning

Read-only SCROLL was specified with the UPDATE clause.

Table 25. Class Code 38: External Function Exception SQLSTATE Value 38xxx Meaning

Valid error SQLSTATEs returned by an external routine or trigger.

17 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 25. Class Code 38: External Function Exception SQLSTATE Value 38000 38001 38002 A Java routine has exited with an exception. The external routine is not allowed to execute SQL statements. The external routine attempted to modify data, but the routine was not defined as MODIFIES SQL DATA. The statement is not allowed in a routine. The external routine attempted to read data, but the routine was not defined as READS SQL DATA. A user-defined function or procedure has abnormally terminated (abend). A routine has been interrupted by the user. An SQL statement is not allowed in a routine on a FINAL CALL. An MQSeries function failed to initialize. MQSeries Application Messaging Interface failed to terminate the session. MQSeries Application Messaging Interface failed to properly process a message. MQSeries Application Messaging Interface failed in sending a message. MQSeries Application Messaging Interface failed to read/receive a message. An MQSeries Application Messaging Interface message was truncated. Error occurred during text search processing. Text search support is not available. Text search is not allowed on a column because a text search index does not exist on the column. A conflicting search administration procedure or command is running on the same text search index. Text search administration procedure error. Meaning

38003 38004 38503 38504 38505 38H01 38H02 38H03 38H04 38H05 38H06 38H10 38H11 38H12 38H13 38H14

18 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 26. Class Code 39: External Function Call Exception SQLSTATE Value 39004 Meaning

A null value is not allowed for an IN or INOUT argument when using PARAMETER STYLE GENERAL or an argument that is a Java primitive type. An output argument value returned from a function or a procedure was too long.

39501

Table 27. Class Code 3B: Savepoint Exception SQLSTATE Value 3B001 3B501 3B502 3B503 The savepoint is not valid. A duplicate savepoint name was detected. A RELEASE or ROLLBACK TO SAVEPOINT was specified, but a savepoint does not exist. A SAVEPOINT, RELEASE SAVEPOINT, or ROLLBACK TO SAVEPOINT is not allowed in a trigger, function, or global transaction. Meaning

Table 28. Class Code 3C: Ambiguous Cursor Name SQLSTATE Value 3C000 The cursor name is ambiguous. Meaning

Table 29. Class Code 40: Transaction Rollback SQLSTATE Value 40001 Meaning

Deadlock or timeout with automatic rollback occurred.

Table 30. Class Code 42: Syntax Error or Access Rule Violation SQLSTATE Value 42501 Meaning

The authorization ID does not have the privilege to perform the specified operation on the identified object. The authorization ID does not have the privilege to perform the operation as specified.
19 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

42502

Table 30. Class Code 42: Syntax Error or Access Rule Violation SQLSTATE Value Meaning

42503

The specified authorization ID or one of the authorization IDs of the application process is not allowed. A specified privilege, security label, or exemption cannot be revoked from a specified authorizationname. Connection authorization failure occurred. Owner authorization failure occurred. SQL statement is not authorized, because of the DYNAMICRULES option. The authorization ID does not have the privilege to create functions or procedures in the WLM environment. The authorization ID does not have security to the protected column. The authorization ID does not have the MLS WRITE-DOWN privilege. The specified authorization ID is not allowed to use the trusted context. A character, token, or clause is invalid or missing. A character that is invalid in a name has been detected. An unterminated string constant has been detected. An invalid numeric or string constant has been detected. The number of arguments specified for a scalar function is invalid. An invalid hexadecimal constant has been detected. An operand of an aggregate function or CONCAT operator is invalid. The use of NULL or DEFAULT in VALUES or an assignment statement is invalid. All operands of an operator or predicate are parameter markers.
20 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

42504

42505 42506 42509 42510

42512 42513 42517 42601 42602 42603 42604 42605 42606 42607 42608 42609

Table 30. Class Code 42: Syntax Error or Access Rule Violation SQLSTATE Value Meaning

42610 42611 42612

A parameter marker or the null value is not allowed. The column, argument, parameter, or global variable definition is invalid. The statement string is an SQL statement that is not acceptable in the context in which it is presented. Clauses are mutually exclusive. A duplicate keyword or clause is invalid. An invalid alternative was detected. The statement string is blank or empty. A host variable is not allowed. Read-only SCROLL was specified with the UPDATE clause. The check constraint or generated column expression is invalid. A name or label is too long. A DEFAULT clause cannot be specified. A CASE expression is invalid. A column specification is not allowed for a CREATE INDEX that is built on an auxiliary table. Parameter names must be specified for SQL routines. An SQLSTATE or SQLCODE variable is not valid in this context. An AS clause is required for an argument of XMLATTRIBUTES or XMLFOREST. The XML name is not valid.

42613 42614 42615 42617 42618 42620 42621 42622 42623 42625 42626 42629 42630 42633 42634

21 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 30. Class Code 42: Syntax Error or Access Rule Violation SQLSTATE Value 42701 42702 42703 42704 42705 42707 42708 42709 42710 42711 42712 Meaning

The same target is specified more than once for assignment in the same SQL statement. A column reference is ambiguous, because of duplicate names. An undefined column or parameter name was detected. An undefined object or constraint name was detected. An undefined server-name was detected. A column name in ORDER BY does not identify a column of the result table. The locale specified in a SET LOCALE or locale sensitive function was not found. A duplicate column name was specified in a key column list. A duplicate object or constraint name was detected. A duplicate column name was detected in the object definition or ALTER TABLE statement. A duplicate table designator was detected in the FROM clause or REFERENCING clause of a CREATE TRIGGER statement. A duplicate object was detected in a list or is the same as an existing object. A host variable can be defined only once. The local server name is not defined. The special register name is unknown at the server. A routine with the same signature already exists. Unable to access an external program used for a user-defined function or a procedure. A routine was referenced directly (not by either signature or by specific instance name), but there is more than one specific instance of that routine. Duplicate names for common table expressions were detected.

42713 42714 42718 42721 42723 42724 42725

42726

22 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 30. Class Code 42: Syntax Error or Access Rule Violation SQLSTATE Value 42732 42734 42736 42737 42749 Meaning

A duplicate schema name in a special register was detected. A duplicate parameter-name, SQL variable name, label, or condition-name was detected. The label specified on the GOTO, ITERATE, or LEAVE statement is not found or not valid. The condition specified is not defined. An XML schema document with the same target namespace and schema location already exists for the XML schema. An XSROBJECT is not found in the XML schema repository. A unique XSROBJECT could not be found in the XML schema repository. The specified attribute was not found in the trusted context. The specified attribute already exists in the trusted context. The specified attribute is not supported in the trusted context. An undefined period name was detectedy. Isolation level UR is invalid, because the result table is not read-only. The number of insert or update values is not the same as the number of columns or variables. A column reference in the SELECT or HAVING clause is invalid, because it is not a grouping column; or a column reference in the GROUP BY clause is invalid. The result expressions in a CASE expression are not compatible. An integer in the ORDER BY clause does not identify a column of the result table. A value cannot be assigned to a variable, because the data types are not compatible. The data-change statement is not permitted on this object. A column identified in the INSERT or UPDATE operation is not updatable.

4274A 4274B 4274C 4274D 4274E 4274M 42801 42802 42803

42804 42805 42806 42807 42808

23 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 30. Class Code 42: Syntax Error or Access Rule Violation SQLSTATE Value 42809 42810 42811 42813 42815 42816 42818 42819 42820 42821 42822 42823 42824 42825 42826 42827 42828 Meaning

The identified object is not the type of object to which the statement applies. A base table is not identified in a FOREIGN KEY clause. The number of columns specified is not the same as the number of columns in the SELECT clause. WITH CHECK OPTION cannot be used for the specified view. The data type, length, scale, value, or CCSID is invalid. A datetime value or duration in an expression is invalid. The operands of an operator or function are not compatible or comparable. An operand of an arithmetic operation or an operand of a function that requires a number is invalid. A numeric constant is too long, or it has a value that is not within the range of its data type. A data type for an assignment to a column or variable is not compatible with the data type. An expression in the ORDER BY clause or GROUP BY clause is not valid. Multiple columns are returned from a subquery that only allows one column. An operand of LIKE is not a string, or the first operand is not a column. The rows of UNION, INTERSECT, EXCEPT, or VALUES do not have compatible columns. The rows of UNION, INTERSECT, EXCEPT, or VALUES do not have the same number of columns. The table identified in the UPDATE or DELETE is not the same table designated by the cursor. The table designated by the cursor of the UPDATE or DELETE statement cannot be modified, or the cursor is read-only. FOR UPDATE OF is invalid, because the result table designated by the cursor cannot be modified. The foreign key does not conform to the description of the parent key.

42829 42830

24 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 30. Class Code 42: Syntax Error or Access Rule Violation SQLSTATE Value 42831 Meaning

A column of a primary key, unique key, ROWID, ROW CHANGE TIMESTAMP does not allow null values. The operation is not allowed on system objects. SET NULL cannot be specified, because no column of the foreign key can be assigned the null value. Cyclic references cannot be specified between named derived tables. The specification of a recursive, named derived table is invalid. The column cannot be altered, because its attributes are not compatible with the current column attributes. A column or parameter definition is invalid, because a specified option is inconsistent with the column description. An invalid use of a NOT DETERMINISTIC or EXTERNAL ACTION function was detected. Cast from source type to target type is not supported. The specified option is not supported for routines. The privileges specified in GRANT or REVOKE are invalid or inconsistent. (For example, GRANT ALTER on a view.) The assignment of the LOB or XML to this variable is not allowed. The target variable for all fetches of a LOB or XML value for this cursor must be the same for all FETCHes. The alter of a CCSID to the specified CCSID is not valid. The data type in either the RETURNS clause or the CAST FROM clause in the CREATE FUNCTION statement is not appropriate for the data type returned from the sourced function or RETURN statement in the function body. FETCH statement clauses are incompatible with the cursor definition. An invalid number of rows was specified in a multiple-row FETCH or multiple-row INSERT. The column name cannot be qualified.

42832 42834

42835 42836 42837

42842

42845 42846 42849 42852

42855

42856 42866

42872 42873 42877

25 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 30. Class Code 42: Syntax Error or Access Rule Violation SQLSTATE Value 42878 42879 Meaning

An invalid function or procedure name was used with the EXTERNAL keyword. The data type of one or more input parameters in the CREATE FUNCTION statement is not appropriate for the corresponding data type in the source function. The CAST TO and CAST FROM data types are incompatible, or would always result in truncation of a fixed string. The specific instance name qualifier is not equal to the function name qualifier. No routine was found with a matching signature. No routine was found with the specified name and compatible arguments. The number of input parameters specified on a CREATE FUNCTION statement does not match the number provided by the function named in the SOURCE clause. The IN, OUT, or INOUT parameter attributes do not match. The function is not valid in the context where it occurs. The table does not have a primary key. The table already has a primary key. A column list was specified in the references clause, but the identified parent table does not have a unique constraint with the specified column names. The object or constraint cannot be dropped, altered, or transferred or authorities cannot be revoked from the object, because other objects are dependent on it. The value of a column or sequence attribute is invalid. For static SQL, an input variable cannot be used, because its data type is not compatible with the parameter of a procedure or user-defined function. An invalid correlated reference or transition table was detected in a trigger. Correlated references and column names are not allowed for triggered actions with the FOR EACH STATEMENT clause.

42880

42882 42883 42884 42885

42886 42887 42888 42889 42890

42893

42894 42895

42898 42899

26 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 30. Class Code 42: Syntax Error or Access Rule Violation SQLSTATE Value 428A1 428B3 428B4 428B7 428C1 428C2 Meaning

Unable to access a file referenced by a file reference variable. An invalid SQLSTATE was specified. The part clause of a LOCK TABLE statement is not valid. A number specified in an SQL statement is out of the valid range. The data type or attribute of a column can only be specified once for a table. Examination of the function body indicates that the given clause should have been specified on the CREATE FUNCTION statement. The number of elements on each side of the predicate operator is not the same. A ROWID or reference column specification is not valid or used in an invalid context. A column defined as GENERATED ALWAYS cannot be specified as the target column of an insert or update operation. AS LOCATOR cannot be specified for a non-LOB parameter. GENERATED is not allowed for the specified data type or attribute of a column. A cursor specified in a FOR statement cannot be referenced in an OPEN, CLOSE, or FETCH statement. The ending label does not match the beginning label. UNDO is not allowed for NOT ATOMIC compound statements. The condition value is not allowed. The sqlcode or sqlstate variable declaration is not valid. The fullselect specified for the materialized query table is not valid. The schema qualifier is not valid. The table cannot be converted to or from a materialized query table.
27 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

428C4 428C7 428C9

428D2 428D3 428D4

428D5 428D6 428D7 428D8 428EC 428EK 428EW

Table 30. Class Code 42: Syntax Error or Access Rule Violation SQLSTATE Value Meaning

428F2 428F4 428F5 428F9 428FA 428FB 428FC 428FE 428FJ

An integer expression must be specified on a RETURN statement in an SQL procedure. The SENSITIVITY specified on FETCH is not allowed for the cursor. The invocation of a routine is ambiguous. A sequence expression cannot be specified in this context. The scale of the decimal number must be zero. Sequence-name must not be a sequence generated by the system. The length of the encryption password is not valid. The data is not a result of the ENCRYPT function. ORDER BY or FETCH FIRST is not allowed in the outer fullselect of a view or materialized query table. A data change statement is not allowed in the context in which it was specified. An SQL data change statement within a SELECT specified a view which is not a symmetric view. Only one INSTEAD OF trigger is allowed for each kind of operation on a view. An INSTEAD OF trigger cannot be created because of how the view is defined. A column cannot be altered as specified. A column cannot be added to an index. The partitioning clause specified on CREATE or ALTER is not valid. A column cannot be added, dropped, or altered in a materialized query table. FINAL TABLE is not valid when the target view of the SQL data change statement in a fullselect has an INSTEAD OF trigger defined.

428FL 428FM 428FP 428FQ 428FR 428FS 428FT 428FY 428G3

28 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 30. Class Code 42: Syntax Error or Access Rule Violation SQLSTATE Value 428G4 428G5 Invalid use of INPUT SEQUENCE ordering. The assignment clause of the UPDATE statement must specify at least one column that is not an INCLUDE column. A character could not be converted and substitution characters are not allowed. An invalid string unit was specified for a function. The data type of one or more parameters specified in the ADD VERSION clause does not match the corresponding data type in the routine being altered. An XML schema is not complete because an XML schema document is missing. The table cannot be truncated because DELETE triggers exist for the table or the table is a parent table of a referential constraint that would be affected by the statement. The system authorization ID specified for a trusted context is already specified in another trusted context. The trusted context is already defined to be used by this authorization ID or PUBLIC. The specified authorization ID or PUBLIC is not defined in the specified trusted context. A table must include at least one column that is not implicitly hidden. The object must be defined as secure because another object depends on it for row-level or columnlevel access control. PERMISSION or MASK cannot be altered. An argument of a user-defined table function must not reference a column for which a column mask is defined. A permission or mask cannot be created on the specified object. A column mask is already defined for the specified column. The statement cannot be processed because a column mask cannot be applied or the definition of the mask conflicts with the statement. Meaning

428GB 428GC 428GH

428GI 428GJ

428GL

428GM 428GN 428GU 428H8

428H9 428HA

428HB 428HC 428HD

29 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 30. Class Code 42: Syntax Error or Access Rule Violation SQLSTATE Value 428HJ 428HK 428HM 428HN 428HO 428I1 42902 Meaning

The organization clause specified on CREATE or ALTER is not valid. The specified hash space is not valid for the implicitly created table space. The system versioning clause specified on CREATE or ALTER is not valid. The period specification is not valid. The system versions clause was specified, but the table is not defined with system versioning. The columns updated by the XMLMODIFY function were not specified in the UPDATE SET clause. The object of the INSERT, UPDATE, or DELETE is also identified (possibly implicitly through a view) in a FROM clause. Invalid use of an aggregate function or OLAP function. DISTINCT is specified more than once in a subselect. An aggregate function in a subquery of a HAVING clause includes an expression that applies an operator to a correlated reference. The string is too long in the context it was specified. The statement does not include a required column list. CREATE VIEW includes an operator or operand that is not valid for views. A decimal divide operation is invalid, because the result would have a negative scale. A column cannot be updated, because it is not identified in the UPDATE clause of the selectstatement of the cursor. The DELETE is invalid, because a table referenced in a subquery can be affected by the operation. An invalid referential constraint has been detected. The object cannot be explicitly dropped or altered. A user-defined data type cannot be created with a system-defined data type name (for example,
30 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

42903 42905 42906

42907 42908 42909 42911 42912

42914 42915 42917 42918

Table 30. Class Code 42: Syntax Error or Access Rule Violation SQLSTATE Value INTEGER). 42924 42925 42927 An alias resolved to another alias rather than a table or view at the remote location. Recursive named derived tables cannot specify SELECT DISTINCT and must specify UNION ALL. The function cannot be altered to NOT DETERMINISTIC or EXTERNAL ACTION because it is referenced by one or more existing views. The program preparation assumptions are incorrect. The name cannot be used, because the specified identifier is reserved for system use. ALTER CCSID is not allowed on a table space or database that contains a view. The server name specified does not match the current server. A long column, LOB column, structured type column or datalink column cannot be used in an index, a key, generated column, or a constraint. Invalid specification of a security label column. The package was not created. An expression in a join-condition or ON clause of a MERGE statement references columns in more than one of the operand tables. The source table of a rename operation is referenced in a context where is it not supported. The statement or routine is not allowed in a trigger. The operation is not allowed with mixed ASCII data. The column, as defined, is too large to be logged. The requested function does not apply to global temporary tables. Capability is not supported by this version of the DB2 application requester, DB2 application server, or the combination of the two. Meaning

42932 42939 42945 42961 42962

42963 42969 42972

42986 42987 42988 42993 42995 42997

31 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 30. Class Code 42: Syntax Error or Access Rule Violation SQLSTATE Value 429B1 429BI 429BN Meaning

A procedure specifying COMMIT ON RETURN cannot be the target of a nested CALL statement. The condition area is full and cannot handle more errors for a NOT ATOMIC statement. A CREATE statement cannot be processed when the value of CURRENT SCHEMA differs from CURRENT SQLID. The specified alter of the data type or attribute is not allowed. Invalid index definition involving an XMLPATTERN clause or a column defined with a data type of XML. Invalid specification of a ROW CHANGE TIMESTAMP column. The statement cannot be processed due to related implicitly created objects. The expression for an index key is not valid. The statement is not allowed when using a trusted connection. A data type cannot be determined for an untyped parameter marker.

429BQ 429BS

429BV 429BW 429BX 429BY 429C1

Table 31. Class Code 44: WITH CHECK OPTION Violation SQLSTATE Value 44000 Meaning

The INSERT or UPDATE is not allowed, because a resulting row does not satisfy the view definition.

Table 32. Class Code 46: Java Errors SQLSTATE Value 46001 46002 46003 Meaning

The URL specified on an install or replace of a jar procedure did not identify a valid jar file. The jar name specified on the install, replace, or remove of a Java procedure is not valid. The jar file cannot be removed, a class is in use by a procedure.

32 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 32. Class Code 46: Java Errors SQLSTATE Value 46007 46008 4600C 4600D 4600E 46103 46501 46502 Meaning

A Java function has a Java method with an invalid signature. A Java function could not map to a single Java method. The jar cannot be removed. It is in use. The value provided for the new Java path is invalid. The alter of the jar failed because the specified path references itself. A Java routine encountered a ClassNotFound exception. The install or remove jar procedure specified the use of a deployment descriptor. A user-defined procedure has returned a DYNAMIC RESULT SET of an invalid class. The parameter is not a DB2 result set.

Table 33. Class Code 51: Invalid Application State SQLSTATE Value 51002 51003 51004 51005 51006 51008 51015 51021 51024 Meaning

The package corresponding to an SQL statement execution request was not found. Consistency tokens do not match. An address in the SQLDA is invalid. The previous system error has disabled this function. A valid connection has not been established. The release number of the program or package is not valid. An attempt was made to execute a section that was found to be in error at bind time. SQL statements cannot be executed until the application process executes a rollback operation. An object cannot be used, because it has been marked inoperative.

33 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 33. Class Code 51: Invalid Application State SQLSTATE Value 51030 Meaning

The procedure referenced in a DESCRIBE PROCEDURE or ASSOCIATE LOCATOR statement has not yet been called within the application process. A valid CCSID has not yet been specified for this DB2 for z/OS subsystem. The operation is not allowed because it operates on a result set that was not created by the current server. The routine defined with MODIFIES SQL DATA is not valid in the context in which it is invoked. A PREVIOUS VALUE expression cannot be used because a value has not been generated for the sequence yet in this session. An implicit connect to a remote server is not allowed because a savepoint is outstanding. The ENCRYPTION PASSWORD value is not set.

51032 51033

51034 51035

51036 51039

Table 34. Class Code 53: Invalid Operand or Inconsistent Specification SQLSTATE Value 53001 53004 53014 53022 53035 53036 53037 53038 53039 Meaning

A clause is invalid, because the table space is a workfile. DSNDB07 is the implicit workfile database. The specified OBID is invalid. Variable or parameter is not allowed. Key limits must be specified in the CREATE or ALTER INDEX statement. The number of PARTITION specifications is not the same as the number of partitions. A partitioned index cannot be created on a table in a non-partitioned table space. The number of key limit values is zero or greater than the number of columns in the key. The PARTITION clause of the ALTER statement is omitted or invalid.

34 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 34. Class Code 53: Invalid Operand or Inconsistent Specification SQLSTATE Value 53040 53041 53043 53044 53045 53088 53089 Meaning

The buffer pool cannot be changed as specified. The page size of the buffer pool is invalid. Columns with different field procedures cannot be compared. The columns have a field procedure, but the field types are not compatible. The data type of the key limit constant is not the same as the data type of the column. LOCKMAX is inconsistent with the specified LOCKSIZE. The number of variable parameters for a stored procedure is not equal to the number of expected variable parameters. Only data from one encoding scheme, either ASCII, EBCDIC or Unicode, can be referenced in the same SQL statement. The encoding scheme specified is not the same as the encoding scheme currently in use for the containing table space. Type 1 index cannot be created for a table using the ASCII encoding scheme. The CCSID ASCII or UNICODE clause is not supported for this database or table space. The PLAN_TABLE cannot be created with the FOR ASCII clause. CREATE or ALTER statement cannot define an object with the specified encoding scheme. The PARTITION clause was specified on CREATE AUXILIARY TABLE, but the base table is not partitioned. The auxiliary table cannot be created because a column was specified that is not a LOB column. A WLM ENVIRONMENT name must be specified on the CREATE FUNCTION statement. An ALTER TABLE statement specified FLOAT as the new data type for a column, but there is an existing index or constraint that restricts the use of FLOAT. The PARTITIONING clause is not allowed on the specified index.

53090

53091

53092 53093 53094 53095 53096

53098 53099 530A1

530A2

35 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 34. Class Code 53: Invalid Operand or Inconsistent Specification SQLSTATE Value 530A3 530A4 Meaning

The specified option is not allowed for the internal representation of the routine specified The options specified on ALTER statement are not the same as those specified when the object was created. The REGENERATE option is only valid for an index with key expressions. EXCHANGE DATA is not allowed because the tables do not have a defined clone relationship. A system parameter is incompatible with the specified SQL statement.

530A5 530A7 530A8

Table 35. Class Code 54: SQL or Product Limit Exceeded SQLSTATE Value 54001 54002 54004 54005 54006 54008 54010 54011 54024 54025 54027 54035 The statement is too long or too complex. A string constant is too long. The statement has too many table names or too many items in a SELECT or INSERT list. The sort key is too long, or has too many columns. The result string is too long. The key is too long, a column of the key is too long, or the key many columns. The record length of the table is too long. Too many columns were specified for a table, view, or table function. The check constraint, generated column, or key expression is too long. The table description exceeds the maximum size of the object descriptor. The catalog has the maximum number of user-defined indexes. An internal object limit exceeded. Meaning

36 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 35. Class Code 54: SQL or Product Limit Exceeded SQLSTATE Value 54038 54041 54042 54051 54054 Meaning

Maximum depth of nested routines or triggers was exceeded. The maximum number of internal identifiers has been reached. Only one index is allowed on an auxiliary table. Value specified on FETCH ABSOLUTE or RELATIVE is invalid. The number of data partitions, or the combination of the number of table space partitions and the corresponding length of the partitioning limit key is exceeded The maximum number of versions has been reached for a table or index. The internal representation of an XML path is too long. The maximum of 99999 implicitly generated object names has been exceeded.

54055 54058 54065

Table 36. Class Code 55: Object Not in Prerequisite State SQLSTATE Value 55002 55003 55004 55006 55007 55011 55012 55014 55015 The explanation table is not defined properly. The DDL registration table is not defined properly. The database cannot be accessed, because it is no longer a shared database. The object cannot be dropped, because it is currently in use by the same application process. The object cannot be altered, because it is currently in use by the same application process. The operation is disallowed, because the workfile database is not in the stopped state. A clustering index is not valid on the table. The table does not have an index to enforce the uniqueness of the primary key. The ALTER statement cannot be executed, because the pageset is not in the stopped state. Meaning

37 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 36. Class Code 55: Object Not in Prerequisite State SQLSTATE Value 55016 55017 55019 55020 55023 55030 55035 55048 55058 55059 55063 55078 Meaning

The ALTER statement is invalid, because the pageset has user-managed data sets. The table cannot be created in the table space, because it already contains a table. The object is in an invalid state for the operation. A work file database is already defined for the member. An error occurred calling a procedure. A package specified in a remote BIND REPLACE operation must not have a system list. The table cannot be dropped, because it is protected. Encrypted data cannot be encrypted. The DEBUG MODE cannot be changed for a routine that was created with DISABLE DEBUG MODE. The currently active version for a routine cannot be dropped. The XML schema is not in the correct state for the operation. The table is already in the specified state.

Table 37. Class Code 56: Miscellaneous SQL or Product Error SQLSTATE Value 56010 Meaning

The subtype of a string variable is not the same as the subtype at bind time, and the difference cannot be resolved by character conversion. The ranges specified for data partitions are not valid. A column cannot be added to the table, because it has an edit procedure. An invalid reference to a remote object has been detected. An invalid use of AT ALL LOCATIONS in GRANT or REVOKE has been detected.

56016 56018 56023 56025

38 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 37. Class Code 56: Miscellaneous SQL or Product Error SQLSTATE Value 56027 Meaning

A nullable column of a foreign key with a delete rule of SET NULL cannot be part of the key of a partitioned index. The clause or scalar function is invalid, because mixed and DBCS data are not supported on this system. Specific and non-specific volume IDs are not allowed in a storage group. The requested feature is not supported in this environment. CURRENT SQLID cannot be used in a statement that references remote objects. The application must issue a rollback operation to back out the change that was made at the readonly application server. The remote requester tried to bind, rebind, or free a trigger package. The parent of a table in a read-only shared database must also be a table in a read-only shared database. User-defined datasets for objects in a shared database must be defined with SHAREOPTIONS(1,3). The database is defined as SHARE READ, but the table space or indexspace has not been defined on the owning system. The description of an object in a SHARE READ database must be consistent with its description in the OWNER system. A database cannot be altered from SHARE READ to SHARE OWNER. An error occurred when binding a triggered SQL statement. An LE function failed. A distributed operation is invalid, because the unit of work was started before DDF. The bind operation is disallowed, because the program depends on functions of a release from which fallback has occurred. The bind operation is disallowed, because the DBRM has been modified or was created for a different release.

56031

56036 56038 56040 56045

56052 56053

56054 56055

56056

56057 56059 56060 56062 56064

56065

39 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 37. Class Code 56: Miscellaneous SQL or Product Error SQLSTATE Value 56066 Meaning

The rebind operation is disallowed, because the plan or package depends on functions of a release from which fallback has occurred. The rebind operation is disallowed, because the value of SYSPACKAGE.IBMREQD is invalid. Execution failed due to the function not supported by a downlevel server that will not affect the execution of subsequent SQL statements. Execution failed due to the function not supported by a downlevel server that will affect the execution of subsequent SQL statements. The data type is not allowed in DB2 private protocol processing. An unsupported SQLTYPE was encountered in a select list or input list. ALTER FUNCTION failed because functions cannot modify data when they are processed in parallel. Specified option requires type 2 indexes. The alter of an index or table is not allowed. A bind option is invalid. Bind options are incompatible. The table space name is not valid. A LOB table and its associated base table space must be in the same database. The table is not compatible with the database. The operation is not allowed on an auxiliary table. An auxiliary table already exists for the specified column or partition. A table cannot have a LOB column unless it also has a ROWID column or cannot have an XML column unless it also has a DOCID. GBPCACHE NONE cannot be specified for a table space or index in GRECP.

56067 56072

56073

56080 56084 56088 56089 56090 56095 56096 560A1 560A2 560A3 560A4 560A5 560A6

560A7

40 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 37. Class Code 56: Miscellaneous SQL or Product Error SQLSTATE Value 560A8 560A9 560AB 560AD Meaning

An 8K or 16K buffer pool pagesize is invalid for a WORKFILE object. A discontinued parameter, option, or clause was specified. The data type is not supported in an SQL routine. A view name was specified after LIKE in addition to the INCLUDING IDENTITY COLUMN ATTRIBUTES clause. The specified table or view is not allowed in a LIKE clause. Procedure failed because a result set was scrollable but the cursor was not positioned before the first row. Open failed because the cursor is scrollable but the client does not support scrollable cursors. Procedure failed because one or more result sets returned by the procedure are scrollable but the client does not support scrollable cursors. Local special register is not valid as used. The SQL statement cannot be executed because it was precompiled at a level that is incompatible with the current value of the ENCODING bind option or special register. Hexadecimal constant GX is not allowed. The encryption and decryption facility has not been installed. An AFTER trigger cannot modify a row being inserted for an INSERT statement. The package must be bound or rebound to be successfully executed. ALTER VIEW failed. ALTER INDEX failed. An XML value contains a combination of XML nodes that causes an internal identifier limit to be exceeded. The maximum number of children nodes for an XML node in an XML value is exceeded.to be

560AE 560B1

560B2 560B3

560B5 560B8

560B9 560BF 560C3 560C5 560C7 560CC 560CG

560CH

41 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 37. Class Code 56: Miscellaneous SQL or Product Error SQLSTATE Value exceeded. 560CK 560CM 560CU 560CV 560CY Explain monitored statements failed. An error occurred in a key expression evaluation. The VARCHAR option is not consistent with the option specified when the procedure was created. Invalid table reference for table locator. A period specification or period clause is not valid as specified. Meaning

Table 38. Class Code 57: Resource Not Available or Operator Intervention SQLSTATE Value 57001 57002 57003 57004 57005 57006 57007 57008 57010 57011 57012 Meaning

The table is unavailable, because it does not have a primary index. GRANT and REVOKE are invalid, because authorization has been disabled. The specified buffer pool has not been activated. The table is unavailable, because it lacks a partitioned index. The statement cannot be executed, because a utility or a governor time limit was exceeded. The object cannot be created, because a DROP or CREATE is pending. The object cannot be used, because an operation is pending. The date or time local format exit has not been installed. A field procedure could not be loaded. Virtual storage or database resource is not available. A non-database resource is not available. This will not affect the successful execution of subsequent statements.

42 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 38. Class Code 57: Resource Not Available or Operator Intervention SQLSTATE Value 57013 Meaning

A non-database resource is not available. This will affect the successful execution of subsequent statements. Processing was canceled as requested. Connection to the local DB2 not established. Character conversion is not defined. A DDL registration table or its unique index does not exist. The DDL statement cannot be executed, because a DROP is pending of a DDL registration table. Deadlock or timeout occurred without automatic rollback. The estimated CPU cost exceeds the resource limit. A table is not available in a routine or trigger because of violated nested SQL statement rules. A table is not available until the auxiliary tables and indexes for its externally stored columns have been created. The SQL statement cannot be executed due to a prior condition in a DRDA chain of SQL statements. Adjustment not allowed for a period as a result of a data change operation.

57014 57015 57017 57018 57023 57033 57051 57053 57054

57057 57062

Table 39. Class Code 58: System Error SQLSTATE Value 58001 58002 58003 58004 Meaning

The database cannot be created, because the assigned DBID is a duplicate. An exit has returned an error or invalid data. An invalid section number was detected. A system error (that does not necessarily preclude the successful execution of subsequent SQL statements) occurred.

43 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS

Table 39. Class Code 58: System Error SQLSTATE Value 58006 58008 A system error occurred during connection. Execution failed due to a distribution protocol error that will not affect the successful execution of subsequent DDM commands or SQL statements. Execution failed due to a distribution protocol error that caused deallocation of the conversation. Execution failed due to a distribution protocol error that will affect the successful execution of subsequent DDM commands or SQL statements. The DDM command is invalid while the bind process in progress. The bind process with the specified package name and consistency token is not active. The SQLCODE is inconsistent with the reply message. The DDM command is not supported. The DDM object is not supported. The DDM parameter is not supported. The DDM parameter value is not supported. The DDM reply message is not supported. The number of variables in the statement is not equal to the number of variables in SQLSTTVRB. Meaning

58009 58010

58011 58012 58013 58014 58015 58016 58017 58018 58026

Table 40. Class Code 5UA: Common Utilities and Tools SQLSTATE Value 5UA01 Meaning

The task cannot be removed because it is currently executing.

44 Lodh Biswajitt | DB WWDC, ST MICROELECTRONICS