DB2 SQL Errors Codes and Error Messages and Warnings from Error -423 to -427

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-423, SQLSTATE=0F001, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
INVALID VALUE FOR LOCATOR IN
POSITION position-#
Explanation: The value specified in a result set locator
host variable, a LOB locator host variable, or a table
locator that is specified at position position-# in the
locator variable list of the SQL statement does not
identify a valid result set locator, LOB locator variable,
or table locator, respectively.
System action: The statement cannot be executed.
Programmer response: For a result set locator there
are two common causes for the error:
v The host variable used as a result set locator was
never assigned a valid result set locator value. Result
set locator values are returned by the DESCRIBE
PROCEDURE and ASSOCIATE LOCATORS
statements. Make sure the value in your host
variable is obtained from one of these statements.
v Result set locator values are only valid as long as the
underlying SQL cursor is open. If a commit or
rollback operation closes an SQL cursor, the result set
locator associated with the cursor is no longer valid.
For a LOB locator, some common causes for the error
are:
v The host variable used as a LOB locator was never
assigned a valid LOB value.
v A commit or rollback operation or an SQL FREE
LOCATOR statement freed the locator.
For a table locator, the error commonly occurs when
the host variable that was used as a table locator was
never assigned a valid table locator value.
SQLSTATE: 0F001

Error: DB2 SQL Error: SQLCODE=-426, SQLSTATE=2D528, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
DYNAMIC COMMIT NOT VALID AT
AN APPLICATION SERVER WHERE
UPDATES ARE NOT ALLOWED
Explanation: An application executing using DRDA
protocols has attempted to issue a dynamic COMMIT
statement, or a stored procedure has attempted to issue
a COMMIT_ON_RETURN, while connected to a
location at which updates are not allowed. A dynamic
COMMIT or COMMIT_ON_RETURN can be
issuedonly while connected to a location at which
updates are allowed.
System action: The statement cannot be executed. No
COMMIT is performed.
Programmer response: The IMS or CICS protocols
should be used to commit work in these environments.
SQLSTATE: 2D528

Error: DB2 SQL Error: SQLCODE=-427, SQLSTATE=2D529, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
DYNAMIC ROLLBACK NOT VALID
AT AN APPLICATION SERVER
WHERE UPDATES ARE NOT
ALLOWED
Explanation: An application executing using DRDA
protocols has attempted to issue a dynamic
ROLLBACK statement while connected to a location at
which updates are not allowed. A dynamic ROLLBACK
may be issued only while connected to a location at
which updates are allowed.
System action: The statement cannot be executed. No
ROLLBACK is performed.
Programmer response: The IMS or CICS protocols
should be used to rollback work in these environments.
SQLSTATE: 2D529

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