DB2 SQL Errors Codes and Error Messages and Warnings from Error +466 to +495

SQLServerF1

Error: DB2 SQL Error: SQLCODE=+466, SQLSTATE=0100C, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
PROCEDURE proc RETURNED num
QUERY RESULTS SETS
Explanation: The stored procedure named by proc
completed normally. The procedure returned the
number of SQL query result sets specified in num.
System action: The SQL statement is successful. The
SQLWARN9 field is set to ‘Z’.
SQLSTATE: 0100C

Error: DB2 SQL Error: SQLCODE=+494, SQLSTATE=01614, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
NUMBER OF RESULT SETS IS
GREATER THAN NUMBER OF
LOCATORS
Explanation: The number of result set locators
specified on the ASSOCIATE LOCATORS statement is
less than the number of result sets returned by the
stored procedure. The first “n” result set locator values
are returned, where “n” is the number of result set
locator variables specified on the SQL statement.
System action: The SQL statement is successful. The
SQLWARN3 field is set to ‘Z’.
Programmer response: Increase the number of result
set locator variables specified on the SQL statement.
SQLSTATE: 01614

Error: DB2 SQL Error: SQLCODE=+495, SQLSTATE=01616, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
ESTIMATED PROCESSOR COST OF
estimate-amount1 PROCESSOR
SECONDS (estimate-amount2 SERVICE
UNITS) IN COST CATEGORY
cost-category EXCEEDS A RESOURCE
LIMIT WARNING THRESHOLD OF
limit- amount SERVICE UNITS
Explanation: The prepare of a dynamic INSERT,
UPDATE, MERGE, DELETE, or SELECT SQL statement
resulted in a cost estimate that exceeded the warning
threshold value specified in the resource limit
specification table (RLST). This warning is also issued if
DB2’s cost category value was “B”, and the default
action specified in the RLF_CATEGORY_B column in
the RLST is to issue a warning.
estimate_amount1
The cost estimate (in processor seconds) if the
prepared INSERT, UPDATE, MERGE,
DELETE, or SELECT statement were to be
executed.
estimate_amount2
The cost estimate (in service units) if the
prepared INSERT, UPDATE, MERGE,
DELETE, or SELECT statement were to be
executed.
cost-category
DB2’s cost-category for this SQL statement.
The possible values are A or B.
limit-amount
The warning threshold (in service units)
specified in the RLFASUWARN column of the
RLST. If you entered any negative number for
the RLFASUWARN column, the value for
limit-amount defaults to zero.
System action: The prepare of the dynamic INSERT,
UPDATE, MERGE, DELETE, or SELECT statement was
successful. An SQLCODE -905 might be issued if the
execution of the prepared statement exceeds the
ASUTIME value specified in the RLST.
User response: If the warning is caused by an SQL
statement that is consuming too much processor
resource, attempt to rewrite the statement to perform
more efficiently. Another option is to ask the
administrator to increase the warning threshold value
in the RLST.
Programmer response: Ensure that there is application
logic to handle the warning to either allow the
statement to execute or to stop the statement from
being executed. If this SQLCODE was returned because
the cost category value is “B”, it might be that the
statement is using parameter markers or that some
statistics are not available for the referenced tables and
columns. Make sure the administrator has run the
utility RUNSTATS on the referenced tables. It might
also be that UDFs will be invoked when the statement
is executed, or for INSERT, UPDATE, MERGE, or
DELETE statements that triggers are defined on the
changed table. Check the DSN_STATEMNT_TABLE or
the IFCID 22 record for this statement to find the
reasons this SQL statement has been put in cost
category “B”.
SQLSTATE: 01616

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