DB2 SQL Errors Codes and Error Messages and Warnings from Error +20245 to +20271

SQLServerF1

Error: DB2 SQL Error: SQLCODE=+20245, SQLSTATE=01663, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
NOT PADDED CLAUSE IS IGNORED
FOR INDEXES CREATED ON
AUXILIARY TABLES
Explanation: The NOT PADDED clause is ignored on
the CREATE INDEX statement because auxiliary
indexes are always PADDED.
System action: The option is ignored; processing
continues.
Programmer response: Remove the NOT PADDED
clause to avoid this warning.
SQLSTATE: 01663

Error: DB2 SQL Error: SQLCODE=+20270, SQLSTATE=01664, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
OPTION NOT SPECIFIED
FOLLOWING ALTER PARTITION
CLAUSE
Explanation: An ALTER INDEX statement, which
included the ALTER PARTITION clause, did not
contain an option following the ALTER PARTITION
keywords.
System action: The SQL statement is processed.
Programmer response: Specify a partition option after
the ALTER PARTITION keywords to avoid this
warning in the future. For an ALTER INDEX statement,
if partition-element is specified, specify either the
ENDING clause of:
v partition-element
v using-block
v free-block
v gbcaches-block
SQLSTATE: 01664

Error: DB2 SQL Error: SQLCODE=+20271, SQLSTATE=01665, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE NAME AT ORDINAL POSITION
position-number IN THE STATEMENT,
WITH NAME column-name, MAY BE
TRUNCATED.
Explanation: At least one column name in the
described statement might be truncated. The column
name was either too long, or became too long after
code page conversion.
position-number
The ordinal position number of the name that
might have been truncated. For the describe
output of a prepared query, the ordinal
position is relative to the select list column of
the query.
column-name
The name that was truncated.
The column name that is stored in the catalog will not
be truncated, but the length of the column name is
limited when using the SQLDA structure.
System action: Processing continues.
User response: If the exact name is significant, do one
of the following:
v For the name of a result column that is specified in
an AS clause, change the name in the AS clause so
that the result column has a shorter name.
v For the name of a column in a table or view, drop
and re-create the table or view so that the column
has a shorter name, or provide a shorter name for
the result column in the query with an AS clause.
v For the name of a column in a table, use the ALTER
TABLE statement to rename the column so that it has
a shorter name.
SQLSTATE: 01665

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