DB2 SQL Errors Codes and Error Messages and Warnings from Error -113 to -115

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-113, SQLSTATE=42602, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
INVALID CHARACTER FOUND IN:
string, REASON CODE nnn
Explanation: The string contains an invalid character.
It can be an SQL ordinary identifier name, a host
variable name, or a DBCS comment.
Certain SQL identifiers (for example names of buffer
pools, databases, and plans) must contain only
uppercase alphabetic or national characters and
numerics; the first character must be alphabetic or
national.
The following reason codes apply to SBCS identifiers:
000 An invalid character was found in the SBCS
identifier (including the case in which a DBCS
identifier was used where only an SBCS
identifier is allowed.)
The following reason codes apply to DBCS identifiers
or comments:
101 An odd number of bytes exists between the
shift-out and the shift-in character.
102 Either a shift-in or shift-out character is
missing.
103 DBCS blanks X’4040′ are not allowed.
104 There are no characters between the shift-out
and the shift-in characters.
105 Shift-out cannot be the first byte of the DBCS
character between the shift-out and the shift-in
characters.
System action: Processing is terminated.
User response: Correct the name.
SQLSTATE: 42602

Error: DB2 SQL Error: SQLCODE=-114, SQLSTATE=42961, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE LOCATION NAME location DOES
NOT MATCH THE CURRENT SERVER
Explanation: A 3-part SQL procedure name was
provided for one of the following SQL statements:
ASSOCIATE LOCATORS
CALL
DESCRIBE PROCEDURE
The first part of the SQL procedure name, which
specifies the location where the stored procedure
resides, did not match the value of the SQL CURRENT
SERVER special register.
System action: The statement cannot be executed.
Programmer response: Take one of these actions to
resolve the mismatch:
v Change the location qualifier to match the
CURRENT SERVER special register.
v Issue an SQL CONNECT to the location where the
stored procedure resides before issuing the SQL
statement. Ensure that the SQL CALL statement is
issued before the ASSOCIATE LOCATORS or
DESCRIBE PROCEDURE.
v Bind the package containing the 3-part SQL
procedure name with the BIND option
DBPROTOCOL(DRDA). With this option, DB2
implicitly uses the DRDA protocol for remote access
to the stored procedure.
v Correct the statements so that the exact syntax used
to specify the procedure name on the CALL
statement be the same as that on the ASSOCIATE
LOCATOR and/or DESCRIBE PROCEDURE. If an
unqualified name is used to CALL the procedure, the
1-part name must also be used on the other
statements. If the CALL statement is made with a
3-part name, and the current server is the same as
the location in the 3-part name, the ASSOCIATE
LOCATOR or DESCRIBE procedure can omit the
location.
SQLSTATE: 42961

Error: DB2 SQL Error: SQLCODE=-115, SQLSTATE=42601, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
A PREDICATE IS INVALID BECAUSE
THE COMPARISON OPERATOR
operator IS FOLLOWED BY A
PARENTHESIZED LIST OR BY ANY
OR ALL WITHOUT A SUBQUERY
Explanation: A simple comparison like ‘>’ must not be
followed by a list of items. ANY and ALL comparisons
must be followed by a subselect, rather than an
expression or a list of items.
System action: The statement cannot be executed.
Programmer response: Correct the SQL statement.
Refer to chapter 2 of SQL Reference for information
about the syntax of SQL statements.
SQLSTATE: 42601

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