DB2 SQL Errors Codes and Error Messages and Warnings from Error -251 to -254

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-251, SQLSTATE=42602, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
TOKEN name IS NOT VALID
Explanation: A location name cannot contain
alphabetic extenders. (The standard alphabetic
extenders in the United States are #, @, $.)
System action: The statement cannot be executed
Programmer response: Correct the name and reissue
the statement.
SQLSTATE: 42602

Error: DB2 SQL Error: SQLCODE=-253, SQLSTATE=22529, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
A NON-ATOMIC statement
STATEMENT SUCCESSFULLY
COMPLETED FOR SOME OF THE
REQUESTED ROWS, POSSIBLY WITH
WARNINGS, AND ONE OR MORE
ERRORS
Explanation: A non-atomic statement statement
successfully processed some of the rows of data that
were requested. However, one or more error conditions
occurred, and some warnings might have also
occurred. Use GET DIAGNOSTICS to obtain
information about the error and warning conditions
that occurred.
System action: One or more rows were successfully
processed, but one or more errors or warnings also
occurred.
Programmer response: Analyze the error and warning
conditions to determine if the statement should be
rolled back.
SQLSTATE: 22529

Error: DB2 SQL Error: SQLCODE=-254, SQLSTATE=22530, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
A NON-ATOMIC statement
STATEMENT ATTEMPTED TO
PROCESS MULTIPLE ROWS OF DATA,
BUT ERRORS OCCURRED
Explanation: A non-atomic statement statement
specified that multiple rows of data were to be
processed, but errors occurred during the processing of
those rows of data. Use GET DIAGNOSTICS to obtain
information about the error and warning conditions
that occurred.
System action: The statement cannot be processed.
Programmer response: Analyze the error and warning
conditions to determine the appropriate corrective
actions.
SQLSTATE: 22530

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