DB2 SQL Errors Codes and Error Messages and Warnings from Error +20002 to +20122
Error: DB2 SQL Error: SQLCODE=+20002, SQLSTATE=01624, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE clause SPECIFICATION IS
IGNORED FOR OBJECT object-name
Explanation: This message is issued in response to a
clause specification that was ignored on a CREATE or
v GBPCACHE: The GBPCACHE clause specified
conflicts with the group buffer pool specification
v PADDED: The PADDED clause was specified on a
CREATE or ALTER of index object-name that does not
have any varying-length character or graphic
columns in the index key. The PADDED attribute
does not apply in this case and is ignored.
v NOT PADDED: The NOT PADDED clause was
specified on a CREATE or ALTER of index
object-name that does not have any varying-length
character or graphic columns in the index key. The
NOT PADDED attribute does not apply in this case
and is ignored.
System action: The statement is processed.
User response: If you want to use one of the
GBPCACHE options other than NONE, you must alter
the table space or index to use a group buffer pool that
is defined with GBPCACHE YES. For index padding,
no action is necessary as the PADDED or NOT
PADDED clause was ignored.
To stop receiving this message, remove the PADDED or
NOT PADDED clause from the CREATE or ALTER
Error: DB2 SQL Error: SQLCODE=+20007, SQLSTATE=01602, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
USE OF OPTIMIZATION HINTS IS
DISALLOWED BY A DB2 SUBSYSTEM
PARAMETER. THE SPECIAL
REGISTER ‘OPTIMIZATION HINT’ IS
SET TO AN EMPTY STRING.
Explanation: DB2 is not enabled to use optimization
hints. The special register OPTIMIZATION HINT is set
to an empty string.
System action: The user-specified optimization hints
are ignored. The access path is determined without the
use of hints and processing continues normally.
Programmer response: Enable the use of
OPTIMIZATION HINT by changing the value of
OPTIMIZATION HINTS on the DB2 Installation panel
If, after further consideration, you do not want to use
an OPTIMIZATION HINT, use the SET CURRENT
OPTIMIZATION HINT statement to disable the use of
Specify an empty string, or a string of blanks, on a SET
CURRENT OPTIMIZATION HINT statement to cause
DB2 to use normal optimization techniques and ignore
Error: DB2 SQL Error: SQLCODE=+20122, SQLSTATE=01644, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
DEFINE NO OPTION IS NOT
APPLICABLE IN THE CONTEXT
Explanation: The DEFINE NO option was specified,
however it is not applicable in the context specified.
DEFINE NO was specified in one of the following
v a CREATE INDEX statement that included the VCAT
v a CREATE INDEX statement for a non-empty table
v a CREATE INDEX statement on a declared
v a CREATE LOB TABLESPACE statement
v a CREATE TABLESPACE statement that included the
v a CREATE INDEX statement for a table that has a
System action: DB2 ignored the DEFINE NO option
and created the object with the DEFINE YES option
Above are list of DB2 SQL Errors and Warnings from Error +20002 to +20122 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.