DB2 SQL Errors Codes and Error Messages and Warnings from Error -353 to -355
Error: DB2 SQL Error: SQLCODE=-353, SQLSTATE=24513, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
FETCH IS NOT ALLOWED, BECAUSE
CURSOR cursor-name HAS AN
Explanation: The cursor position for cursor-name is
unknown. The previous multiple-row-fetch for cursor
cursor-name resulted in an error in the middle of
processing multiple rows that were retrieved from DB2.
One or more of the requested rows could not be
returned to the program following the error, leaving the
position of the cursor unknown.
The error might have been detected at the requester.
For example, a row with a null value was returned to
an application, but no indicator variable was provided.
A subsequent FETCH statement would result in
SQLCODE -353. If an indicator had been provided, a
positive SQLCODE would have been returned and all
of the rows retrieved from DB2 could have been
returned to the application program.
System action: The statement cannot be processed.
The cursor position is not changed.
Programmer response: Close and reopen the cursor to
reset the cursor position. For scrollable cursors, you can
change the FETCH statement to specify one of the
other fetch orientations. For example, you can modify
the FETCH statement by specifying one of the
following fetch orientations:
v BEFORE or AFTER
v row-positioned fetch orientations: FIRST, LAST, or
ABSOLUTE to establish a valid row cursor and fetch
a row of data
v rowset-positioned fetch orientations: FIRST ROWSET,
LAST ROWSET, or ROWSET STARTING AT
ABSOLUTE to establish a valid rowset cursor
position and fetch multiple rows of data
Alternately, change the application to correct the error
that originally occurred. For example, if the error was
issued because an indicator was not provided, change
the application to provide an indicator.
Error: DB2 SQL Error: SQLCODE=-354, SQLSTATE=22537, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
A ROWSET FETCH STATEMENT MAY
HAVE RETURNED ONE OR MORE
ROWS OF DATA. HOWEVER, ONE OR
MORE NON-TERMINATING ERROR
CONDITIONS WERE ENCOUNTERED.
USE THE GET DIAGNOSTICS
STATEMENT FOR MORE
INFORMATION REGARDING THE
CONDITIONS THAT WERE
Explanation: A rowset FETCH statement encountered
one or more non-terminating error conditions. One or
more warnings might also have been encountered. Use
the GET DIAGNOSTICS statement to obtain
information about the conditions that occurred, and to
determine if data was returned. It is possible that one
or more rows of data were returned. In cases where the
row information returned for the row that encountered
the condition is incomplete, use of the data for the row
that encountered the condition, such as displaying or
printing the data, is not recommended.
System action: DB2 processed the statement
successfully, but with at least one non-terminating
error. Additionally, the fetching of some rows might
have encountered warnings.
Programmer response: Analyze the conditions to
determine whether follow-up actions are needed. The
GET DIAGNOSTICS statement can be used to
determine which additional actions might be necessary.
Attention: It is possible that an end of data condition
was detected. SQLERRD3 and GET DIAGNOSTICS can
be used to determine if all the requested rows were
fetched or if a partial rowset was returned.
Error: DB2 SQL Error: SQLCODE=-355, SQLSTATE=42993, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
A LOB COLUMN IS TOO LARGE TO
Explanation: One of the following has occurred:
v a CREATE TABLE statement for an auxiliary table
stores a BLOB, CLOB or DBCLOB column whose
length exceeds 1 gigabyte but whose associated LOB
table space was defined with the LOG YES attribute
v an ALTER TABLESPACE statement of a LOB table
space specifies the LOG YES clause but the auxiliary
table in the LOB table space stores a BLOB or CLOB
column whose length exceeds 1 gigabyte or a
DBCLOB column whose length exceeds 500
System action: The statement cannot be executed.
Programmer response: Either change the attribute of
the LOB table space to LOG NO or drop the base table,
and recreate it with columns of an acceptable length for
Above are list of DB2 SQL Errors and Warnings from Error -353 to -355 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.