DB2 SQL Errors Codes and Error Messages and Warnings from Error -105 to -108

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-105, SQLSTATE=42604, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
INVALID STRING
Explanation: The statement contains an invalid string.
It is neither a character string nor a graphic string.
System action: The statement cannot be executed.
Programmer response: Specify the correct format of
the string. Check for a graphic string, paired delimiters,
the character G or N, and an even number of bytes
within the string.
SQLSTATE: 42604

Error: DB2 SQL Error: SQLCODE=-107, SQLSTATE=46002, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE NAME name IS TOO LONG.
MAXIMUM ALLOWABLE SIZE IS size
Explanation: The name is too long. The maximum
permissible length for names of that type is indicated
by size. For each type of name, the SQL Reference lists
the maximum allowed length.
For an SQL version ID, the name must not exceed 64
EBCDIC bytes, or 122 UTF-8 bytes.
System action: The statement cannot be processed.
Programmer response: Choose a shorter name for the
object.
SQLSTATE: 46002

Error: DB2 SQL Error: SQLCODE=-108, SQLSTATE=42601, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE NAME name IS QUALIFIED
INCORRECTLY
Explanation: The name name is improperly qualified.
A target name on the RENAME statement may not
have a schema qualifier.
System action: The statement cannot be executed.
Programmer response: Remove the schema qualifier
and reissue the statement.
SQLSTATE: 42601

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