DB2 SQL Errors Codes and Error Messages and Warnings from Error -611 to -613
Error: DB2 SQL Error: SQLCODE=-611, SQLSTATE=53088, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
ONLY LOCKMAX 0 CAN BE
SPECIFIED WHEN THE LOCK SIZE OF
THE TABLESPACE IS TABLESPACE OR
Explanation: This message is issued when:
v The LOCKSIZE of the table space is TABLESPACE or
TABLE, and LOCKMAX is being altered to or created
as a nonzero value.
v The LOCKSIZE of the table space is being altered to
TABLESPACE or TABLE, and LOCKMAX is being
altered to or created as a nonzero value.
If LOCKSIZE is TABLESPACE or TABLE, LOCKMAX
must be 0 because lock escalation is not supported
from these levels.
System action: The statement cannot be executed.
Programmer response: Do one of the following:
v Reissue the statement with LOCKMAX 0.
v Alter the LOCKSIZE of the table space to a value
other than TABLESPACE or TABLE.
Error: DB2 SQL Error: SQLCODE=-612, SQLSTATE=42711, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
identifier IS A DUPLICATE NAME
Explanation: Column names must be unique within
an index, a table, a view, or in the UPDATE OF clause
of a trigger definition. The following situations might
cause this error:
v For a CREATE INDEX, CREATE TABLE, CREATE
VIEW or ALTER TABLE statement, the same
column-name was specified for two or more columns
of the index, table, view.
v For a CREATE or ALTER TABLE statement, a
constraint specified an XML column. The constraint
definition contains an expression that invokes the
XMLQUERY function or uses the XMLEXISTS
v For a CREATE TRIGGER statement, the UPDATE OF
clause specified the same column name more than
v The PASSING clause of an XMLQUERY, or
XMLEXISTS contains two arguments with the same
v The SQL data change statement uses an include
column, and the column-name specified is the same
as another column-name of the target table or view
or another include column.
v An XMLQUERY, or XMLEXISTS argument list
contains two arguments with the same name.
Column names must be unique within an index, a
table, a view, or in the UPDATE OF clause of a trigger
definition. Additionally, a column cannot be specified
in more than one ALTER TABLE clause except if it is
specified in an ALTER COLUMN clause and ADD
CHECK CONSTRAINT clause.
System action: The statement cannot be processed
Programmer response: Correct the CREATE statement
to specify unique names for each of the columns of the
index, table, view, or the columns in the UPDATE OF
clause of a trigger definition. Correct the ALTER
statement to specify unique names for each of the
ALTER COLUMN clauses. This error can also occur on
CREATE TABLE when a column list of a PRIMARY
KEY, FOREIGN KEY, or UNIQUE clause contains two
or more occurrences of the same column name.
Error: DB2 SQL Error: SQLCODE=-613, SQLSTATE=54008, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE PRIMARY KEY OR A UNIQUE
CONSTRAINT IS TOO LONG OR HAS
TOO MANY COLUMNS
Explanation: This error code results from a problem
with the columns that are defined for a PRIMARY KEY
or UNIQUE constraint. The number of columns is
greater than 64, or the sum of the column length
attributes is greater than the number allowed for the
type of index.
If the failing statement was an ALTER TABLE
statement that included the SET DATA TYPE clause to
alter the definition of an existing column, a column
being changed is part of a unique or primary
constraint. The new sum of the lengths of the columns
of the keys exceeds 255-n, where n is the number of
columns allowing nulls. This sum currently exceeds the
maximum number that is allowed.
If the failing statement was an ALTER TABLE
statement with a PARTITIONING KEY specification,
only 64 columns can be specified, and the combined
lengths of all columns specified in the PARTITIONING
KEY clause exceeds the maximum length of 255-n,
where n is the number of columns that can contain null
System action: The CREATE or ALTER statement
cannot be executed. The specified table cannot be
created or altered.
Programmer response: Change the table definition to
keep within the prescribed limits.
Above are list of DB2 SQL Errors and Warnings from Error -611 to -613 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.
Information about DB2 SQL Error Codes and Error Messages on Windows, Linux and Z/OS Operating Systems.