DB2 SQL Errors Codes and Error Messages and Warnings from Error -625 to -627

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-625, SQLSTATE=55014, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
TABLE table-name DOES NOT HAVE
AN INDEX TO ENFORCE THE
UNIQUENESS OF THE PRIMARY OR
UNIQUE KEY
Explanation: The ALTER TABLE statement is invalid
for one of the following reasons:
v The table does not have a unique index with a key
that is identical to the nominated primary or unique
key.
v A unique index exists, but the index is already being
used to enforce referential constraints. In this case,
DB2 does not choose the index to enforce the
primary or unique key.
System action: The statement cannot be executed.
Programmer response: Make sure the key list
specified on the ALTER TABLE statement identifies an
existing unique index of the table that is not already
enforcing referential constraints.
SQLSTATE: 55014

Error: DB2 SQL Error: SQLCODE=-626, SQLSTATE=55015, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE ALTER STATEMENT IS NOT
EXECUTABLE BECAUSE THE PAGE
SET IS NOT STOPPED
Explanation: An ALTER statement specifies an ADD
PART, BUFFERPOOL, USING, PRIQTY, SECQTY,
ERASE, or GBPCACHE clause, but the page set is not
stopped.
System action: The SQL statement was not executed.
Programmer response: Stop the page set and resubmit
the statement.
SQLSTATE: 55015

Error: DB2 SQL Error: SQLCODE=-627, SQLSTATE=55016, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE ALTER STATEMENT IS INVALID
BECAUSE THE TABLE SPACE OR
INDEX HAS USER-MANAGED DATA
SETS
Explanation: This error is issued for the following
reasons:
v a CREATE or ALTER statement specified a PRIQTY,
SECQTY, or ERASE clause, USING STOGROUP was
not specified, and the table space or index has
user-managed data sets. The primary and secondary
space allocation of a user-managed data set cannot
be altered by means of an ALTER statement.
v an ALTER statement attempted to define a clone
table for a base table that is in a table space that has
user-managed data sets. A clone table cannot be
defined for a base table that is in a table space that
has user-managed data sets.
System action: The SQL statement cannot be executed.
Programmer response: Verify that the correct table,
index, or partition is specified.
SQLSTATE: 55016

Above are list of DB2 SQL Errors and Warnings from Error -625 to -627 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 *