DB2 SQL Errors Codes and Error Messages and Warnings from Error -618 to -620
Error: DB2 SQL Error: SQLCODE=-618, SQLSTATE=42832, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
OPERATION operation IS NOT
ALLOWED ON SYSTEM DATABASES
Explanation: System databases cannot be the object of
certain types of operations. The attempted ‘operation’
cannot be performed on system databases. Possible
v CCSID ASCII was specified when a system database
was being created.
v APPEND was specified when a system database was
System action: The statement cannot be executed. No
changes were made to the specified system database.
User response: Do not attempt to perform the
requested operation on system databases.
Error: DB2 SQL Error: SQLCODE=-619, SQLSTATE=55011, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
OPERATION DISALLOWED BECAUSE
THE DATABASE IS NOT STOPPED
Explanation: The statements CREATE, ALTER or
DROP for a table space, table, or index in the database
cannot be processed unless the database is stopped
(using the STOP command).
System action: The statement cannot be processed.
Programmer response: Issue the -DISPLAY
DATABASE command to verify that the work file
database is stopped before resubmitting the statement.
Error: DB2 SQL Error: SQLCODE=-620, SQLSTATE=53001, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
KEYWORD keyword IN stmt-type
STATEMENT IS NOT PERMITTED
FOR A space-type SPACE IN THE
Explanation: The specified keyword in the SQL
statement stmt-type indicates an attribute that is not
allowed for a space-type space in the database-type
database. For example, you cannot set LOGGED or
NOT LOGGED when you create or alter a table space
in a WORK FILE database.
keyword Specifies the keyword that is not allowed.
CREATE or ALTER
CREATE is for CREATE TABLESPACE or
ALTER is for ALTER TABLESPACE or ALTER
TABLE or INDEX
TABLE is for table space, and INDEX is for
WORK FILE or TEMP
System action: The statement cannot be executed.
Programmer response: Refer to SQL Reference for
information about attributes that are allowed or not
allowed for a space-type space in a database-type
database. Correct and resubmit the stmt-type statement.
Above are list of DB2 SQL Errors and Warnings from Error -618 to -620 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.
Information about DB2 SQL Error Codes and Error Messages on Windows, Linux and Z/OS Operating Systems.