Reference from DB2 Developer's Guide, Fourth Edition.
DB2 Error Messages (Sorted by SQLCODE)
| SQLCODE | SQLSTATE | Description |
|---|---|---|
| -530 | 23503 | Invalid foreign key value specified for the specified constraint name. |
| -531 | 23504 | As of V5, multi-row update of a parent key attempted to remove a parent key vale on which a foreign key was dependent. |
| Prior to V5, attempting to update a primary key value when foreign keys currently exist that reference that value. | ||
| -532 | 23504 | Deletion violates the named referential constraint. |
| -533 | 21501 | Invalid multiple row insert; attempted to insert multiple rows into a self-referencing table. |
| -534 | 21502 | An update statement changing the value of a primary key column cannot be used to update more than one row at a time. |
| -535 | 21502 | Cannot specify WHERE CURRENT OF when deleting from a self-referencing table or updating primary key column(s). This code will be raised only by non-V5 subsystems. |
| -536 | 42914 | Invalid delete statement due to referential constraints existing for the specified table. |
| -537 | 42709 | A single column cannot appear more than once in a foreign key or primary key clause specification. |
| -538 | 42830 | Invalid foreign key; does not conform to the definition of the referenced table's primary key. |
| -539 | 42888 | Foreign key cannot be defined because the referenced table does not have a primary key. |
| -540 | 57001 | Table definition is incomplete until a unique index is created for the primary key or UNIQUE clause, or the ROWID column contains the GENERATED BY DEFAULT attribute. |
| -542 | 42831 | Nullable columns are not permitted to be included as part of a primary key. |
| -543 | 23511 | DELETE cannot occur because the table is a parent table in a referential constraint specifying the SET NULL delete rule, but the check constraint does not allow NULLs. |
| -544 | 23512 | Cannot add this check constraint using ALTER because an existing row violates the check constraint. |
| -545 | 23513 | INSERT or UPDATE caused a check constraint violation. |
| -546 | 42621 | Invalid check constraint specified in CREATE or ALTER TABLE. |
| -548 | 42621 | Invalid check constraint due to named column. |
| -549 | 42509 | Invalid SQL statement for DYNAMICRULES(BIND) plan or package. |
| -551 | 42501 | User is attempting to perform an operation on the specified object for which he is not authorized, or the table does not exist. |
| -552 | 42502 | User is attempting to perform an operation for which he is not authorized. |
| -553 | 42503 | Cannot set CURRENT SQLID because the user has not been set up to change to that ID. |
| -554 | 42502 | Cannot grant a privilege to yourself. |
| -555 | 42502 | Cannot revoke a privilege from yourself. |
| -556 | 42504 | Cannot revoke a privilege that the user does not possess. |
| -557 | 42852 | Inconsistent grant or revoke key word specified. |
| -558 | 56025 | Invalid clause or clauses specified for the grant or revoke statement. |
| -559 | 57002 | The DB2 authorization mechanism has been disabled. Grant and revoke cannot be issued. |
| -567 | 42501 | Named authorization ID lacks the authority to bind the named package. |
| -571 | 25000 | Multiple site updates are not permitted. |
| -573 | 42890 | Referential constraint cannot be defined because the named parent table does not have a unique key on the specified column. |
| -574 | 42894 | Specified default conflicts with the column definition. |
| -577 | 38002 | Tried to modify data in a user-defined function or stored procedure that was created without the MODIFIES SQL DATA option. |
| -579 | 38004 | Tried to read data in a user-defined function or stored procedure that was created without either the READS SQL DATA or MODIFIES SQL DATA option. |
| -580 | 42625 | Result expressions of a CASE expression cannot all be NULL. |
| -581 | 42804 | Incompatible data types in the result expressions of a CASE expression. |
| -582 | 42625 | Search-condition in a searched-when-clause specifies a quantified, IN, or EXISTS predicate. |
| -583 | 42845 | The specified function is invalid because it is not deterministic or may have an external action. |
| -585 | 42732 | The schema name appears more than once in the current path. |
| -586 | 42907 | The CURRENT PATH special register cannot exceeed 254 characters in length. |
| -587 | 428C6 | The list of item-references must be of the same family. |
| -590 | 42734 | The parameter name must be unique within the named stored procedure or user-defined function. |
| -592 | 42510 | Not authorized to create stored procedures or user-defined functions in WLM environment. |
| -601 | 42710 | Attempting to create (or rename) an object that already exists. |
| -602 | 54008 | Too many columns specified in the CREATE INDEX statement. |
| -603 | 23515 | Unique index cannot be created because duplicates were found. |
| -604 | 42611 | Invalid length, precision, or scale specified for the data type in a CREATE or ALTER TABLE statement. |
| -607 | 42832 | The INSERT UPDATE or DELETE statement specified cannot be issued as written against the DB2 Catalog tables. |
| -611 | 53088 | When LOCKSIZE is TABLE or TABLESPACE, LOCKMAX must 0. |
| -612 | 42711 | Duplicate column names not permitted within a single table, index, or view. |
| -613 | 54008 | The primary key or UNIQUE constraint is too long or contains too many columns. |
| -614 | 54008 | Maximum internal key length of 255 for indexes has been surpassed. |
| -615 | 55006 | Cannot drop this package because it is currently executing. |
| -616 | 42893 | The specified object cannot be dropped because other objects are dependent upon it. |
| -617 | 56089 | Type 1 index is invalid for DB2 Version 6. For previous releases, a type 1 index cannot be defined with LOCKSIZE ROW or LARGE tablespace. |
| -618 | 42832 | Requested operation not permitted for DB2 Catalog tables. |
| -619 | 55011 | DSNDB07 cannot be modified unless it has first been stopped. |
| -620 | 53001 | The specified key word is not permitted for a tablespace in DSNDB07. |
| -621 | 58001 | Duplicate DBID encountered; system problem encountered. |
| -622 | 56031 | Cannot specify FOR MIXED DATA because the mixed data option has not been installed. |
| -623 | 55012 | Cannot define more than one clustering index for a single table. |
| -624 | 42889 | Cannot define more than one primary key for a single table. |
| -625 | 55014 | A unique index is required for a table defined with a primary key. |
| -626 | 55015 | Cannot issue an ALTER statement to change PRIQTY SECQTY or ERASE unless the tablespace has first been stopped. |
| -627 | 55016 | Cannot issue an ALTER statement to change PRIQTY SECQTY or ERASE unless the tablespace has first been defined to use storage groups. |
| -628 | 42613 | The clauses specified are mutually exclusive (for example, cannot partition a segmented tablespace). |
| -629 | 42834 | SET NULL is invalid because the foreign key cannot contain null values. |
| -630 | 56089 | WHERE NOT NULL cannot be specified for Type 1 indexes. |
| -631 | 54008 | Invalid foreign key; is either longer than 254 bytes or contains more than 40 columns. |
| -632 | 42915 | The specified delete rules prohibit defining this table as a dependent of the named table. |
| -633 | 42915 | Invalid delete rule; the specified mandatory delete rule must be used. |
| -634 | 42915 | DELETE CASCADE is not allowed in this situation. |
| -635 | 42915 | The delete rule cannot be different or cannot be SET NULL. |
| -636 | 56016 | The partitioning index must be consistent in its specification of ascending or descending for the partitioning index key. |
| -637 | 42614 | Duplicate key word encountered. |
| -638 | 42601 | Missing column definition in CREATE TABLE statement. |
| -639 | 56027 | A nullable column of a foreign key with a delete rule of SET NULL cannot be a column of the key of a partitioning index. |
| -640 | 56089 | LOCKSIZE ROW cannot be specified for this tablespace because a Type 1 index is defined on a table in the tablespace. |
| -642 | 54021 | Unique constraint contains too many columns. |
| -643 | 54024 | Check constraint exceeds maximum length of 3,800 characters. |
| -644 | 42615 | Invalid value specified for key word in the SQL statement. |
| -646 | 55017 | The table cannot be created in the specified partitioned or default tablespace because the specified tablespace already contains a table. |
| -647 | 57003 | The specified bufferpool is invalid because it has not been activated. |
| -650 | 56090 | ALTER INDEX cannot be executed; reason code provided. |
| -651 | 54025 | Table object descriptor (OBD) would exceed maximum size (32KB) if the CREATE or ALTER TABLE were allowed. |
| -652 | 23506 | Violation of EDITPROC or VALIDPROC encountered. |
| -653 | 57004 | A table in a partitioned tablespace is unavailable because the partitioning index has not been created yet. |
| -655 | 56036 | STOGROUP cannot specify both specific and non-specific ("*") volumes in the volume list. |
| -658 | 42917 | The specified object cannot be dropped as attempted. The object must be dropped by dropping an associated object. |
| -660 | 53035 | Improper partitioning index specification; must define limit keys for the clustering index. |
| -661 | 53036 | Partitioning index does not specify the proper number of partitions. |
| -662 | 53037 | Attempted to create a partitioning index on a non-partitioned (segmented or simple) tablespace. |
| -663 | 53038 | Invalid number of key limit values specified for the partitioning index. |
| -665 | 53039 | Invalid PART clause specified for ALTER TABLESPACE statement. |
| -666 | 57005 | SQL statement cannot be processed because the specified function is current in progress. |
| -667 | 42917 | Cannot explicitly drop the clustering index for a partitioned tablespace; must drop the partitioned tablespace to drop index. |
| -668 | 56018 | Cannot add a column to a table defined with an EDITPROC. |
| -669 | 42917 | Cannot explicitly drop a table in a partitioned tablespace; must drop the partitioned tablespace to drop the table. |
| -670 | 54010 | The record length for the table exceeds the page size. |
| -671 | 53040 | Cannot alter the bufferpool for the specified tablespace because it would change the page size of the tablespace. |
| -672 | 55035 | DROP not allowed on named table. |
| -676 | 53041 | Only a 4KB bufferpool can be used for an index. |
| -677 | 57011 | Bufferpool expansion failed due to insufficient amount of available virtual storage. |
| -678 | 53045 | The literal specified for the limit key in the partitioning index does not conform to the data type of the key value. |
| -679 | 57006 | Cannot create the specified object because a drop is currently pending for that object. |
| -680 | 54011 | No more than 750 columns can be specified for a DB2 table. |
| -681 | 23507 | Column violates specified FIELDPROC. |
| -682 | 57010 | FIELDPROC could not be loaded. |
| -683 | 42842 | Invalid column, distinct type, function, or procedure because of incompatible clauses. For example, specifying INTEGER with the FOR BIT DATA option. |
| -684 | 54012 | The specified literal list cannot exceed 254 bytes. |
| -685 | 58002 | FIELDPROC returned an invalid field description. |
| -686 | 53043 | A column defined with a FIELDPROC cannot be compared to a column defined with a different FIELDPROC. |
| -687 | 53044 | A column cannot be compared to a column with an incompatible field type. |
| -688 | 58002 | Incorrect data returned by the FIELDPROC. |
| -689 | 54011 | Dependent table defined with too many columns. |
| -690 | 23508 | Data definition control support rejected this statement. |
| -691 | 57018 | The named registration table does not exist. |
| -692 | 57018 | The named index does not exist, but is required for the named registration table. |
| -693 | 55003 | The named column for the named registration table/index is invalid. |
| -694 | 57023 | A DROP is pending on the named registration table. |
| -696 | 42898 | The specified trigger is invalid due to improper use of correlation name or transition table name. |
| -697 | 42899 | FOR EACH statement clause specified, so OLD and NEW correlation names are not allowed; or OLD_TABLE and NEW_TABLE cannot be specified for a BEFORE trigger. |
| -713 | 42815 | The special register value specified is invalid. |
| -715 | 56064 | The named program cannot be run because it depends on features of a release of DB2 that your shop has installed but backed off. |
| -716 | 56065 | The named program was precompiled with an incorrect level for this release. |
| -717 | 56066 | BIND failed because it depends on features of a release of DB2 that your shop has installed but backed off. |
| -718 | 56067 | REBIND failed because IBMREQD column is invalid. |
| -719 | 42710 | Cannot BIND ADD a package that already exists. |
| -720 | 42710 | Cannot BIND REPLACE a package version that already exists. |
| -721 | 42710 | Consistency token must be unique for package. |
| -722 | 42704 | Bind error due because the named package does not exist. |
| -723 | 09000 | A triggered SQL statement received an error. |
| -724 | 54038 | Maximum number of cascading indirect SQL statements reached (16). |
| -725 | 42721 | Invalid value supplied to the specified special register. |
| -726 | 55030 | Cannot bind this package because of SYSPKSYSTEM entries. |
| -728 | 56080 | The specified data type cannot be used with private protocol distribution. |
| -729 | 429B1 | A stored procedure defined using COMMIT ON RETURN cannot be the target of a nested procedure CALL. |
| -730 | 56053 | Invalid referential integrity definition for a table in a read-only shared database. |
| -731 | 56054 | VSAM data set must be defined using SHAREOPTION(1,3). |
| -732 | 56055 | Read-only database defined, but the owning DB2 subsystem has not defined the tablespace or index space. |
| -733 | 56056 | Inconsistent read-only shared database definition. |
| -734 | 56057 | Once a database has been defined as ROSHARE READ, it cannot be altered to a different ROSHARE state. |
| -735 | 55004 | The database identified by the named DBID is no longer a read-only shared database. |
| -736 | 53014 | The named OBID is invalid. |
| -737 | 56056 | Cannot create an implicit tablespace under these circumstances. |
| -739 | 56088 | The specified function cannot be altered because both the ALLOW PARALLEL and MODIFIES SQL DATA clauses were specified. |
| -740 | 51034 | The specified function cannot be defined with MODIFIES SQL DATA in this way. |
| -741 | 55030 | Work file database already defined for named data sharing group member. |
| -742 | 53004 | DSNDB07 is the implicit work file database. |
| -746 | 57053 | The SQL statement in the specified trigger, stored procedure, or function violates the nesting SQL restriction. |
| -747 | 57054 | The specified table is not available until the required auxiliary tables have been created for the LOB data columns. |
| -748 | 54042 | An index already exists on the specified auxiliary table. |
| -750 | 42986 | Cannot rename the named table because it is referenced in at least one existing view or trigger. |
| -751 | 42987 | A stored procedure or user-defined function tried to execute an SQL statement that is not allowed. The DB2 thread is placed in MUST_ROLLBACK state. |
| -752 | 0A001 | Invalid CONNECT statement. |
| -763 | 560A1 | Invalid tablespace name. |
| -764 | 560A2 | The LOB tablespace must be in the same database as its associated base tablespace. |
| -765 | 560A3 | The table is not compatible with the database. |
| -766 | 560A4 | Cannot perform the requested operation on an auxiliary table. |
| -767 | 42626 | The CREATE INDEX failed because columns were specified for an index on an auxiliary table, or because columns were not specified on an index on a non-auxiliary table. |
| -768 | 560A5 | Cannot create an auxiliary table for the specified column or partition because one already exists. |
| -769 | 53096 | The specs for the CREATE AUX TABLE do not match the base table. |
| -770 | 530A6 | The specified table must have a ROWID column before it can contain a LOB column. |
| -771 | 428C7 | Invalid ROWID column specification. |
| -797 | 42987 | The CREATE TRIGGER contains unsupported syntax. |
| -798 | 428C9 | Cannot insert a value into a ROWID column defined with GENERATED ALWAYS. |
| -802 | 22012 | Exception error has occurred for the specified operation. Divide by zero. |
| 22003 | Exception error has occurred for the specified operation. Other than divide by zero. | |
| -803 | 23505 | Cannot insert row because it would violate the constraints of a unique index. |
| -804 | 07002 | The call parameter list for the SQLDA is in error. |
| -805 | 51002 | The DBRM or package name not found in plan. |
| -807 | 23509 | Package not enabled for the named environment and connection. |
| -808 | 08001 | The CONNECT statement is not consistent with the program's first CONNECT statement. |
| -811 | 21000 | Must use a cursor when more than one row is returned as the result of an embedded select statement. |
| -812 | 22508 | Collection-ID is blank in the CURRENT PACKAGESET; statement cannot be executed. |
| -815 | 42920 | A GROUP BY or HAVING clause is implicitly or explicitly specified in an embedded select statement or a subquery of a basic predicate. |
| -817 | 25000 | Execution of the SQL statement would result in a prohibited update to user data or the DB2 Catalog. |
| -818 | 51003 | Plan <--> load module timestamp mismatch. The DBRM in the executing plan was not created from the same precompilation as the load module. |
| -819 | 58004 | View cannot be recreated because the length of the parse tree stored in the DB2 Catalog is zero. |
| -820 | 58004 | Invalid value encountered in DB2 Catalog for this DB2 release. |
| -822 | 51004 | Invalid address encountered in the SQLDA. |
| -840 | 54004 | Too many items returned in a select list or insert list. |
| -842 | 08002 | A connection to the named location already exists. |
| -843 | 08003 | The SET CONNECTION or RELEASE statement cannot be executed because the connection does not exist. |
| -870 | 58026 | The number of host variable descriptors does not equal the number of host variables in the statement. |
| -872 | 51032 | A valid CCSID has yet to be specified for this subsystem. |
| -873 | 53090 | Cannot refer to a column defined in an ASCII table in the same SQL statement as a column defined in an EBCDIC table. |
| -874 | 53091 | The encoding scheme for the specified object does not match the encoding scheme for its tablespace. |
| -875 | 42988 | Specified operand cannot be used with ASCII data. |
| -876 | 53092 | Object cannot be created for the specified reason; reason code provided. |
| -877 | 53093 | ASCII not permitted for the database or tablespace; EBCDIC must be used. |
| -878 | 53094 | This PLAN_TABLE cannot be ASCII; EBCDIC must be used. |
| -879 | 53095 | The CREATE or ALTER statement for the specified object cannot define the column, distinct type, or parameter of a stored procedure or user-defined function parameter as MIXED DATA, GRAPHIC, VARGRAPHIC, or LONG VARGRAPHIC because the system does not have an appropriate CCSID defined for the encoding scheme specified. |
| -900 | 08003 | Application process is not connected to an application server; statement cannot be executed. |
| -901 | 58004 | Intermittent system error encountered that does not inhibit subsequent SQL statements from being executed. |
| -902 | 58005 | Internal control block pointer error; rebind required. |
| -904 | 57011 | The specified resource is unavailable. |
| -905 | 57014 | Resource limit has been exceeded. |
| -906 | 51005 | SQL statement cannot be executed because of prior error. |
| -908 | 23510 | Current Resource Limit Facility specification or Auto-Rebind system parameter does not permit the BIND, REBIND, or AUTO-REBIND. |
| -909 | 57007 | The object has been deleted. |
| -910 | 57007 | Cannot access an object for which a DROP is pending. |
| -911 | 40001 | The current unit of work has been rolled back. |
| -913 | 57033 | Unsuccessful execution caused by either a deadlock or a timeout. |
| -917 | 42969 | Bind package has failed. |
| -918 | 51021 | SQL statement cannot be executed because connection was lost. |
| -919 | 56045 | A ROLLBACK is required. |
| -922 | 42505 | Connection authorization failure. Attempting to access DB2 from TSO, CICS, or IMS, and appropriate attachment facility is inactive. |
| -923 | 57015 | Connection not established because DB2 is unavailable. |
| -924 | 58006 | DB2 internal connection error encountered; reason code provided. |
| -925 | 2D521 | The SQL COMMIT statement cannot be issued from CICS or IMS/TM. |
| -926 | 2D521 | The SQL ROLLBACK statement cannot be issued from CICS or IMS/TM. |
| -927 | 51006 | The language interface was called when the connecting environment was not established. Invoke the program using the DSN command. |
| -929 | 58002 | Data capture exit has failed. (DPROP) |
| -939 | 51021 | Rollback is required due to unrequested rollback of a remote server. |
| -947 | 56038 | SQL statement failed because update cannot be propagated. (DPROP) |
| -948 | 56062 | DDF not started; distributed operation is invalid. |
| -950 | 42705 | Location specified in the SQL statement not defined in SYSIBM.LOCATIONS. |
| -965 | 51021 | Stored procedure terminated abnormally (prior to DB2 Version 6). |
| -981 | 57015 | Attempt to execute SQL in the RRSAF when it was not in a state to allow SQL. |
| -991 | 57015 | Call attach was not able to establish an implicit connect or open to DB2. |
| -2001 | 53089 | Number of host variable parameters specified for a stored procedure does not equal the expected number of parameters. |
| -20003 | 560A7 | Cannot specify GBPCACHE NONE for tablespace or index in GRECP. |
| -20004 | 560A8 | 8KB or 16KB bufferpool page size is invalid for a WORKFILE object. |
| -20005 | 54035 | The internal ID limit has been exceeded for the specified object type. |
| -20006 | 53097 | A LOB cannot be specified as a parameter when no WLM environment is specified. |
| -20070 | 53098 | Cannot create an auxiliary table for a non-LOB column. |
| -20071 | 53099 | Must specify the WLM environment name. |
| -20072 | 56052 | Specified authid does not possess the needed authority to perform the BIND on the trigger package. |
| -20073 | 42927 | Cannot alter the named function as specified because it is referenced in existing view definitions. |
| -20074 | 42939 | The specified object cannot be created because "SYS" is a reserved prefix. |
| -20100 | 56059 | BIND error in triggered SQL statement; SQLCODE and SQLSTATE of the error is specified. |
| -20101 | 56059 | The function failed for the specified reason code. |
| -20102 | 42849 | Cannot use the specified option in the CREATE or ALTER FUNCTION statement. |
| -20104 | 42856 | Failed attempt to alter a CCSID. |
| -20106 | 42945 | Cannot change the CCSID for the tablespace or database because of existing view references. |
| -30000 | 58008 | DRDA distribution protocol error; processing can continue. |
| -30002 | 57057 | A distributed client using DRDA chained an OPEN statement to a PREPARE, but the PREPARE received a SQLCODE +495 warning. |
| -30020 | 58009 | DRDA distribution protocol error; conversation deallocated. |
| -30021 | 58010 | DRDA distribution protocol error; processing cannot continue. |
| -30030 | 58013 | Distribution protocol violation; COMMIT unsuccessful, conversation deallocated. (AS) |
| -30040 | 57012 | Execution failed due to unavailable resource(s); processing can continue. (AS) |
| -30041 | 57013 | Execution failed due to unavailable resource(s); processing cannot successfully continue. |
| -30050 | 58011 | Execution unsuccessful; statement cannot be executed during the BIND process. |
| -30051 | 58012 | Failure caused by specific BIND process not being active. (Remote BIND) |
| -30052 | 42932 | Program preparation assumption incorrect. |
| -30053 | 42506 | Authorization failure encountered for package owner. |
| -30060 | 08004 | Authorization failure encountered for RDB. |
| -30061 | 08004 | Invalid or non-existent RDB specified. |
| -30070 | 58014 | Target subsystem does not support this command. |
| -30071 | 58015 | Target subsystem does not support this object. |
| -30072 | 58016 | Target subsystem does not support this parameter. |
| -30073 | 58017 | Target subsystem does not support this parameter value. |
| -30074 | 58018 | Reply message not supported. |
| -30080 | 08001 | SNA communication error. |
| -30081 | 58019 | TCP/IP communication error. |
| -30082 | 08001 | Communication failed due to security violation; reason code provided. |
| -30090 | 25000 | Specified operation invalid for remote execution. |
| -30104 | 56095 | Error in bind option and bind value. |
| -30105 | 56096 | The specified bind options are incompatible. |


