DB2 SQL Errors Codes and Error Messages and Warnings from Error -614 to -616

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-614, SQLSTATE=54008, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE INDEX CANNOT BE CREATED
OR ALTERED, OR THE LENGTH OF A
COLUMN CANNOT BE CHANGED
BECAUSE THE SUM OF THE
INTERNAL LENGTHS OF THE
COLUMNS FOR THE INDEX IS
GREATER THAN THE ALLOWABLE
MAXIMUM
Explanation: The index could not be created or the
length of a column cannot be changed because the sum
of the internal lengths of the key columns would
exceed the allowable maximum. The maximum
permitted key length is as follows:
v For PADDED indexes, the sum of the length
attributes of the columns must not be greater than
2000-n, where n is the number of columns that
contain null values.
v For NOT PADDED indexes, the sum of the length
attributes of the columns must not be greater than
2000-n-2m, where n is the number of nullable
columns and m is the number of varying length
columns.
System action: The statement cannot be executed. The
specified index was not created or the length of the
column was not changed.
Programmer response: The definition for the index
must be modified (possibly by eliminating one or more
key columns) to reduce the length of the key to the
permitted maximum. Refer to chapter 2 of SQL
Reference if you require a complete explanation of other
possible maximum key lengths and how they are
computed.
SQLSTATE: 54008

Error: DB2 SQL Error: SQLCODE=-615, SQLSTATE=55006, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
operation-type IS NOT ALLOWED ON A
PACKAGE IN USE
Explanation: The operation ‘operation-type’ cannot be
performed because the package is in use by the same
application process.
operation-type
Type of bind operation (BIND, REBIND or
DROP).
System action: The BIND, REBIND, or DROP
operation on the package is not performed.
Programmer response: Change the application to
invoke the BIND, REBIND or DROP operation when
the package is not use by the same application process.
SQLSTATE: 55006

Error: DB2 SQL Error: SQLCODE=-616, SQLSTATE=42893, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
obj-type1 obj-name1 CANNOT BE
DROPPED BECAUSE IT IS
REFERENCED BY obj-type2 obj-name2
Explanation: Some types of objects cannot be dropped
if there are other objects which are dependent upon
them. For example, a storage group cannot be dropped
if there are one or more existing table spaces that use
that storage group.
Execution of the specified DROP statement would drop
object obj-name1 of type obj-type1 on which object
obj-name2 of type obj-type2 is dependent.
System action: The statement cannot be processed.
The specified object was not dropped.
Programmer response: Verify that the object specified
in the DROP statement was, indeed, the object to be
dropped. If so, all the existing objects that have a
dependency on that object must first be dropped.
A LOB table space cannot be dropped when an
association exists between it and another table space.
The associated base table must be dropped first.
A populated auxiliary table and its index can only be
dropped by dropping the associated base table.
A trigger package cannot be explicitly dropped. It can
only be dropped by dropping the associated trigger
with a DROP TRIGGER statement or by dropping the
triggering table.
SQLSTATE: 42893

Above are list of DB2 SQL Errors and Warnings from Error -614 to -616 received while performing certain operation against DB2 Database or related products.

SQLCODE – Regardless of whether the application program provides an SQLCA or a stand-alone variable, SQLCODE is set by DB2 after each SQL statement is
executed. DB2 conforms to the ISO/ANSI SQL standard as follows:
If SQLCODE = 0, execution was successful.
If SQLCODE > 0, execution was successful with a warning.
If SQLCODE < 0, execution was not successful.
SQLCODE = 100, “no data” was found. For example, a FETCH statement returned no data because the cursor was positioned after the last row of the result table.

SQLSTATE – SQLSTATE is also set by DB2 after the execution of each SQL statement. Thus, application programs can check the execution of SQL statements by testing SQLSTATE instead of SQLCODE.

Hope this was helpful.

Thanks,
SQLServerF1 Team
Information about DB2 SQL Error Codes and Error Messages on Windows, Linux and Z/OS Operating Systems.

 

Leave a Reply

Your email address will not be published. Required fields are marked *