DB2 SQL Errors Codes and Error Messages and Warnings from Error -644 to -647

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-644, SQLSTATE: 42615, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
INVALID VALUE SPECIFIED FOR
KEYWORD OR CLAUSE
keyword-or-clause IN STATEMENT
stmt-type
Explanation: The value specified for the
keyword-or-clause parameter in the stmt-type SQL
statement is not a permitted value.
System action: The SQL statement cannot be executed.
Programmer response: Correct the statement. Refer to
chapter 2 of SQL Reference for information about the
permissible values for the keyword-or-clause keyword in
stmt-type statements.
SQLSTATE: 42615

Error: DB2 SQL Error: SQLCODE=-646, SQLSTATE: 55017, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
-646 TABLE table-name CANNOT BE
CREATED IN SPECIFIED TABLE
SPACE table-space-name BECAUSE IT
ALREADY CONTAINS A TABLE
Explanation:
The table space specified in a CREATE TABLE
statement is a partitioned, implicitly defined, LOB table
space, or an XML table space in which an existing table
already resides. Only one table can reside in these
types of table spaces.
System action: The statement cannot be executed. The
table was not created.
Programmer response:
Verify that the correct table space was specified in the
CREATE statement. Do not attempt to create more than
one table in a partitioned, implicitly defined, LOB or
XML table space.
SQLSTATE: 55017

Error: DB2 SQL Error: SQLCODE=-647, SQLSTATE: 57003, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
-647 BUFFERPOOL bp-name FOR IMPLICIT
OR EXPLICIT TABLESPACE OR
INDEXSPACE name HAS NOT BEEN
ACTIVATED
Explanation: The buffer pool specified in a CREATE
or ALTER statement for a table space or index (index
space) is not activated. Alternatively, on a CREATE
TABLE statement without an IN clause, the buffer pool,
which is chosen by DB2 implicitly according to the
actual record size, is not activated.
Table spaces and indexes (index spaces) can only be
assigned or reassigned to buffer pools that are currently
activated.
System action: The statement cannot be executed. The
specified table space or index space was not created or
altered.
Programmer response: Verify that the proper buffer
pool was specified in the CREATE or ALTER statement
and the buffer pool is chosen by DB2. Use the
-DISPLAY BUFFERPOOL command to display the
attributes of the buffer pool and determine if the buffer
pool is activated. If the buffer pool is not activated, use
the -ALTER BUFFERPOOL command to change the
VPSIZE from 0 to the desired size.
SQLSTATE: 57003

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