
The SQL return codes are listed here numerically, you may browse through them or you may enter the code you are looking for and press the enter key to go directly to the return code description.
+012 +100 +117
+162 +203 +204
+205 +206 +218
+219 +220 +304
+331 +402 +403
+541 +551 +552
+558 +561 +625
+626 +650 +653
+664 +738 +802
+806 +807 +863
+30100
UNQUALIFIED COLUMN NAME column-name WAS INTERPRETED AS A CORRELATED REFERENCE
Explanation: The column name does not identify a column of a table or view in the FROM clause of the subquery. However, it does identify a column of a table or view in a FROM clause at a higher level in the statement.
System Action: The column name is interpreted as a correlated reference.
Programmer Response: If DB2's interpretation of the column name was not what you intended, rewrite the SQL statement and submit it again. If you intend the column name to refer to a table named at a higher level, we advise rewriting the statement anyway, using a table name or correlation name as a qualifier for the column name. The unqualified column name could be interpreted differently if you do a rebind after altering one of the tables to which you refer.
SQLSTATE: 01545
ROW NOT FOUND FOR FETCH, UPDATE OR DELETE, OR THE RESULT OF A QUERY IS AN EMPTY TABLE
Explanation: One of the following conditions occurred:
When a SELECT statement is executed using SPUFI, this SQL code indicates normal completion.
System Action: No data was retrieved, updated, or deleted.
SQLSTATE: 02000
THE NUMBER OF INSERT VALUES IS NOT THE SAME AS THE NUMBER OF OBJECT COLUMNS
Explanation: The number of insert values in the value list of the INSERT statement is not the same as the number of object columns specified.
System Action: A valid plan or package will be created if no errors are detected. The statement is bound dynamically on each execution of the statement.
Programmer Response: For better performance, rebind the plan or package after correcting the statement. To correct the statement, specify one and only one value for each of the specified object columns.
SQLSTATE: 01525
TABLESPACE database-name.tablespace-name HAS BEEN PLACED IN CHECK PENDING
Explanation: The indicated table space is in the CHECK PENDING state because ALTER TABLE was used to specify a referential constraint on a populated table. The table space is not generally available until the CHECK PENDING state is removed from the table space.
System Action: The table space has been placed in CHECK PENDING state.
Programmer Response: The use of CHECK DATA is advised.
SQLSTATE: 01514
THE QUALIFIED COLUMN NAME column-name WAS RESOLVED USING A NON-UNIQUE OR UNEXPOSED NAME
Explanation: The table designator selected to resolve a qualified column name is one of the following:
Therefore, the statement does not conform to the guidelines for using only unique exposed names as qualifiers or it is possible that the column reference was not resolved to the intended instance of the table or view.
System Action: DB2 uses the selected name to resolve the reference.
Programmer Response: If DB2's resolution of the qualifier was not what you intended, rewrite the SQL statement and submit it again. The rules used to resolve column name qualifiers are given in Chapter 3 of SQL Reference.
SQLSTATE: 52002
name IS AN UNDEFINED NAME
Explanation: The object identified by 'name' is not defined in the DB2 subsystem. This return code can be generated for any type of DB2 object.
System Action: A valid plan or package will be created if no errors are detected. The statement is bound dynamically on each execution of the statement.
Programmer Response: For better performance, rebind the plan or package after correcting the statement. To correct the statement, determine that the object name was correctly specified in the SQL statement (including any required qualifiers). If so, ensure that the object exists in the system before resubmitting the statement.
SQLSTATE: 01532
column-name IS NOT A COLUMN OF TABLE table-name
Explanation: No column with the specified 'column-name' occurs in the table or view 'table-name'.
System Action: A valid plan or package will be created if no errors are detected. The statement is bound dynamically on each execution of the statement.
Programmer Response: For better performance, rebind the plan or package after correcting the statement. To correct the statement, verify that the column and table names are specified correctly (including any required qualifiers) in the SQL statement.
SQLSTATE: 01533
column-name IS NOT A COLUMN OF AN INSERTED TABLE, UPDATED TABLE, OR ANY TABLE IDENTIFIED IN A FROM CLAUSE
Explanation: This return code is used to report one of these errors:
System Action: A valid plan or package will be created if no errors are detected. The statement is bound dynamically on each execution of the statement.
Programmer Response: For better performance, rebind the plan or package after correcting the statement. To correct the statement, verify that the column and table names are specified correctly in the SQL statement. In the case of a SELECT statement, check to be sure that all of the required tables were named in the FROM clause.
SQLSTATE: 01533
THE SQL STATEMENT REFERENCING A REMOTE OBJECT CANNOT BE EXPLAINED
Explanation: The user has used EXPLAIN(YES) on the bind subcommand to bind an application which has SQL statement referencing a remote object or the user has a static EXPLAIN SQL statement which references a remote object in the application program. EXPLAIN on a remote object is not supported by DB2.
It is issued at BIND time, and only with VALIDATE(RUN).
System Action: The plan or package will be bound successfully, but no information will be filled in the user's PLAN-TABLE for the SQL statement referencing a remote object. A -512 SQLCODE will be issued at run time if the EXPLAIN statement is found to explain a remote object.
SQLSTATE: 01537
THE REQUIRED EXPLANATION TABLE table-name DOES NOT EXIST
Explanation: The EXPLAIN statement assumes the existence of the explanation table and it is not defined in the DB2 subsystem as a base table. Refer to Chapter 5 of SQL Reference for more information.
System Action: A valid plan or package will be created if no errors are detected. The statement is bound dynamically on each execution of the statement.
Programmer Response: For better performance, rebind the plan or package after correcting the statement. To correct the statement, determine whether the required explanation table does exist. If not, create the required table.
SQLSTATE: 01532
THE COLUMN column-name IN EXPLANATION TABLE table-name IS NOT DEFINED PROPERLY
Explanation: An error occurred during the insertion of a row into the explanation table. The table is improperly defined for the following reasons:
System Action: A valid plan or package will be created if no errors are detected. The statement is bound dynamically on each execution of the statement.
Programmer Response: For better performance, rebind the plan or package after correcting the statement. To correct the statement, correct the definition of the required explanation table. Refer to Chapter 5 of SQL Reference for information about defining an explanation table.
SQLSTATE: 01546
A VALUE WITH DATA TYPE data-type1 CANNOT BE ASSIGNED TO A HOST VARIABLE BECAUSE THE VALUE IS NOT WITHIN THE RANGE OF THE HOST VARIABLE IN POSITION position-number WITH DATA TYPE data-type2
Explanation: A FETCH or SELECT into a host variable list or structure, position number 'position-number' failed because the host variable having data type 'data-type2' was not large enough to hold the retrieved value having data type 'data-type1'.
System Action: The FETCH or SELECT could not return the data for the indicated SELECT item, the indicator variable is set to negative two (-2) to indicate a null value returned. Processing continues.
Programmer Response: Verify that table definitions are current, and that the host variable has the proper data type. See the explanation for SQL return code -405 for ranges of SQL data types.
SQLSTATE: 01515
THE NULL VALUE HAS BEEN ASSIGNED TO A HOST VARIABLE BECAUSE THE STRING CANNOT BE TRANSLATED. REASON reason-code, CHARACTER code-point, HOST VARIABLE position-number
Explanation: A string assigned to a host variable had to be translated from its coded character set to the coded character set of the host variable and an error occurred during the translation. The position-number is the ordinality of the host variable in the SQLDA. See the description of SQLCODE -331 for further information including the meaning of the reason-code and code-point.
System Action: The host variable is unchanged and its indicator variable is set to -2 to indicate that a null value is returned. Execution of the statement continues as if the translation error had not occurred.
SQLSTATE: 01520
LOCATION location IS UNKNOWN
Explanation: A remote object is referenced and either the table SYSIBM.SYSLOCATIONS is not defined or the referenced 'location' matches no entry in the SYSIBM.SYSLOCATIONS.LOCATION column.
System Action: For the CREATE ALIAS statement, the alias is created. For binding a plan or package with the VALIDATE(RUN) option, the plan or package is created. package is created.
SQLSTATE: 01521
THE LOCAL OBJECT REFERENCED BY THE CREATE ALIAS STATEMENT DOES NOT EXIST
Explanation: The local object referenced by the CREATE ALIAS statement does not exist when creating the alias.
System Action: The alias is created.
SQLSTATE: 01522
THE REFERENTIAL OR UNIQUE CONSTRAINT name HAS BEEN IGNORED BECAUSE IT IS A DUPLICATE
Explanation: A FOREIGN KEY clause uses the same key and parent table as another FOREIGN KEY clause, or a UNIQUE clause uses the same column list as another UNIQUE clause. In either case, the duplicate clause is ignored. 'name' is either the foreign key name or the name of the first column in the constraint that is ignored.
System Action: DB2 continues processing.
Programmer Response: If the duplication is an error, correct the statement and execute it again.
SQLSTATE: 01543
auth-id DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION operation ON OBJECT object-name
Explanation: Authorization ID 'auth-id' has attempted to perform the specified 'operation' on object 'object-name' without having been granted the proper authority to do so. This error might also occur if the specified object does not exist, if the object is a read-only view (for UPDATE or INSERT), or if 'auth-id' is trying to create a table or view with an authorization ID other than its own. Only if your authorization ID is SYSADM, DBADM, or DBCTRL can you create a table or view from an 'auth-id' other than your own.
If this error occurs while DB2 is creating or altering a table involving referential constraints, this code reports that the user does not have the necessary ALTER privilege to perform a FOREIGN KEY, DROP FOREIGN KEY, or DROP PRIMARY KEY operation. The 'object-name' identifies the object table of the CREATE or ALTER TABLE statement, not the table for which the user lacks the ALTER privilege.
System Action: A valid plan or package will be created if no errors are detected. The statement is bound dynamically on each execution of the statement.
Programmer Response: For better performance, rebind the plan or package after correcting the statement. To correct the statement, ensure that 'auth-id' has been granted the authority to perform the desired operation, that 'object-name ' exists, and that 'auth-id' is not trying to create a table with a different authorization ID.
SQLSTATE: 01548
auth-id DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION operation
Explanation: Authorization ID 'auth-id' has attempted to perform the specified 'operation' without having been granted the authority to do so.
System Action: A valid plan or package will be created if no errors are detected. The statement is bound dynamically on each execution of the statement.
Programmer Response: For better performance, rebind the plan or package after correcting the statement. To correct the statement, ensure that the authorization-ID has been granted the authority necessary to perform the desired operation.
SQLSTATE: 01542
THE WITH GRANT OPTION IS IGNORED
Explanation: The GRANT statement contained one of the following situations:
The WITH GRANT option may not be used in the above situations.
System Action: The offending privilege(s) in the authorization specification are granted without the GRANT option. If the grantee is PUBLIC, all the privileges in the authorization specification are granted without the GRANT option.
SQLSTATE: 01516
THE ALTER AND INDEX PRIVILEGES CANNOT BE GRANTED TO "PUBLIC AT ALL LOCATIONS"
Explanation: You entered a GRANT statement with either an ALL or ALL PRIVILEGES keyword. ALL and ALL PRIVILEGES imply the granting of ALTER and INDEX privileges that cannot be granted to a remote user.
System Action: DB2 executes the GRANT statement; however, it does not grant the ALTER and INDEX privileges to 'PUBLIC*'.
SQLSTATE: 01523
THE DEFINITION OF TABLE table-name HAS BEEN CHANGED TO INCOMPLETE
Explanation: This warning code is used to report that the definition of the indicated table is incomplete because DROP INDEX was used to drop its primary index. The table is not generally available until a new primary index is created.
System Action: The definition of the table is marked as incomplete. Subsequent references to the table in DDL or DML statements will cause SQL code -540 to be returned. Attempts to run already bound plans referencing the table will result in SQL -904 or -923 with resource unavailable reason code 00C9009F. CHECK and LOAD utilities involving the table are not allowed. If they are used, you will receive message DSNU305I or DSNT500I with reason code 00C9009F. Utilities other than CHECK and LOAD are allowed.
Programmer Response: Recreate the primary index using CREATE INDEX. This will remove the table from INCOMPLETE DEFINITION status.
Note: The reason that a primary index may need to be dropped and recreated is to change the STOGROUP or SUBPAGES parameters of the index.
SQLSTATE: 01518
DROPPING THE INDEX TERMINATES ENFORCEMENT OF THE UNIQUENESS OF A KEY THAT WAS DEFINED WHEN THE TABLE WAS CREATED
Explanation: The index was created to enforce the uniqueness of a key that was defined as UNIQUE when the table was created. Dropping the index terminates enforcement of the unique constraint by DB2.
System Action: The index is dropped.
Programmer Response: If the unique constraint is still intended to apply, create a new unique index with the same key as the dropped index.
SQLSTATE: 01529
THE TABLE BEING CREATED OR ALTERED CANNOT BECOME A DEPENDENT TABLE
Explanation: This table is defined with the maximum number of columns. It cannot be altered to be a dependent table later.
System Action: The table is created. Check to see if the table will become a dependent table at a later time. If yes, drop and recreate the table with fewer than 750 columns.
SQLSTATE: 01538
TABLE table-name IN PARTITIONED TABLESPACE tspace-name IS NOT AVAILABLE BECAUSE ITS PARTITIONED INDEX HAS NOT BEEN CREATED
Explanation: An attempt has been made to insert or manipulate data in or create a view on a partitioned table (that is, a table residing in a partitioned table space) before the partitioned index for that table has been created.
A table residing in a partitioned table space cannot be referenced in any SQL manipulative statement or a CREATE VIEW statement before the partitioned index for that table has been created.
System Action: A valid plan or package will be created if no errors are detected. The statement is bound dynamically on each execution of the statement.
Programmer Response: For better performance, rebind the plan or package after correcting the statement. To correct the statement, verify that the correct table was specified in the statement. If so, ensure that the partitioned index for the table has been created successfully before attempting to execute any SQL manipulative statements that reference that table.
SQLSTATE: 01551
THE INTERNAL LENGTH OF THE LIMIT-KEY FIELDS FOR THE PARTITIONED INDEX index-name EXCEEDS THE LENGTH IMPOSED BY THE INDEX MANAGER
Explanation: The CREATE INDEX statement defines a partitioned index (that is, the cluster index for a table residing in a partitioned table space), and the length of the limit key exceeds the permitted maximum.
The index manager restricts the internal length of the limit keys for a partitioned index to a maximum of 40 bytes. The sum of the internal lengths of the limit keys specified in the PART clause of the CREATE INDEX statement exceeds that 40-byte maximum. The limit key was truncated to 40 bytes.
System Action: The specified index was created but the limit key was truncated to 40 bytes.
SQLSTATE: 01540
DEFINITION CHANGE OF object object_name MAY REQUIRE SIMILAR CHANGE ON READ-ONLY SYSTEMS
Explanation: A change was made to the definition of the specified object that may also require a similar change to any read-only shared systems.
System Action: The statement is successfully executed.
Programmer Response: Check the read-only shared systems that have the specified object defined, and determine if a change must be made to the object on those systems.
SQLSTATE: 01530
EXCEPTION ERROR exception-type HAS OCCURRED DURING operation-type OPERATION ON data-type DATA, POSITION position-number
Explanation: The exception error 'exception-type' occurred while doing an ADDITION, SUBTRACTION, MULTIPLICATION, DIVISION, or NEGATION operation on a field whose 'data-type' is DECIMAL, FLOAT, SMALLINT, or INTEGER. The error occurred while processing an arithmetic expression in the SELECT list of an outer SELECT statement, and the position in the select list is denoted by 'position-number'. The possible exception types are FIXED POINT OVERFLOW, DECIMAL OVERFLOW, DIVIDE EXCEPTION, EXPONENT OVERFLOW, and ZERO DIVIDE. The data type displayed in the message may indicate the data type of the temporary internal copy of the data, which may differ from the actual column or literal data type due to conversions by DB2.
A fixed point overflow can occur during any arithmetic operation on either INTEGER or SMALLINT fields.
A decimal overflow exception can occur when one or more non-zero digits are lost because the destination field in any decimal operation is too short to contain the result.
A divide exception can occur on a decimal division operation when the quotient exceeds the specified data-field size. A zero divide exception occurs on any division by zero.
An exponent overflow can occur when the result characteristic of any floating-point operation exceeds 127 and the result fraction is not zero, i.e. the magnitude of the result exceeds approximately 7.2E+75.
Note: Parts of 'exception-type', 'data-type', 'operation-type', and 'position-number' may or may not be returned in SQLCA, depending upon when the error was detected.
System Action: For each expression in error the indicator variable is set to negative two (-2) to indicate a null value returned. The data variable is unchanged. Execution of the statement continues with all non-error columns and expressions of the outer SELECT list being returned. If the statement is cursor controlled then the CURSOR will remain open.
Programmer Response: Examine the expression for which the warning occurred to see if the cause (or the likely cause) of the problem can be determined. The problem may be data-dependent, in which case it will be necessary to examine the data that was being processed at the time the error occurred.
See the explanation of SQLCODE -405 for allowed ranges of numeric data types.
SQLSTATE: 01519
BIND ISOLATION LEVEL RR CONFLICTS WITH TABLESPACE LOCKSIZE PAGE
Explanation: The specification of isolation level RR is incompatible with the LOCKSIZE PAGE specification for a table space accessed by the application package. Table space locking is used in order to protect the integrity of the application.
System Action: A valid package will be created if no errors are detected. Table space locking is used. RR isolation level is preserved.
Programmer Response: If page locking is desired, ISOLATION LEVEL CS must be used.
SQLSTATE: 01553
THE RESULT OF DECIMAL MULTIPLICATION MAY CAUSE OVERFLOW
Explanation: An arithmetic expression contains a decimal multiplication that may cause an overflow condition when the statement is executed. The problem may be corrected by restructuring the arithmetic expression so that decimal multiplication precedes decimal division or by changing the precision and scale of the operands in the arithmetic expression. Refer to Chapter 2 of SQL Reference for the precision and scale of the decimal multiplication and division results.
System Action: A valid package will be created if no errors are detected.
SQLSTATE: 01554
THE CONNECTION WAS SUCCESSFUL BUT ONLY SBCS WILL BE SUPPORTED
Explanation: The target AS supports only the DB2 SBCS CCSID. The DB2 Mixed CCSID or GRAPHIC CCSID or both are not supported by the target AS. DB2 character data sent to the target AS must be restricted to SBCS.
System Action: The CONNECT statement is successful. The release level of the target AS has been placed into the SQLERRP field of the SQLCA (see SQL Reference for the CONNECT statement).
Programmer Response: Do not execute any SQL statements which pass either mixed data or graphic data as input host variables.
SQLSTATE: 01539
OPERATION COMPLETED SUCCESSFULLY BUT A DISTRIBUTION PROTOCOL VIOLATION HAS BEEN DETECTED. ORIGINAL SQLCODE=original-sqlcode AND ORIGINAL SQLSTATE=original-sqlstate
Explanation: The application requested operation (either COMMIT or ROLLBACK) has completed successfully but the response from the remote server and the SQLCODE that was returned from the remote server are inconsistent. For example, the reply message from the remote server indicates that a COMMIT operation completed successfully but the SQLCODE returned from the AS was negative.
System Action: An alert was generated. A DSNL031I message may have been written to the console. Refer to the description of this message for further information.
The SQLCODE returned by the remote server is replaced with +30100 and the SQLSTATE returned by the remote server is replaced with 01558.
The SQLCODE and SQLSTATE values that were returned from the AS are stored in the SQLERRM field in a string of the following format: 'original-sqlcode 'FF'X original-sqlstate'
Programmer Response: Notify the System Programmer for assistance in analyzing the trace data that was generated.
SQLSTATE: 01558