DB2 SQL Errors Codes and Error Messages and Warnings from Error -618 to -620

SQLServerF1

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
reasons are:
v CCSID ASCII was specified when a system database
was being created.
v APPEND was specified when a system database was
being created.
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.
SQLSTATE: 42832

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.
SQLSTATE: 55011

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
database-type DATABASE
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.
stmt-type
CREATE or ALTER
CREATE is for CREATE TABLESPACE or
CREATE INDEX.
ALTER is for ALTER TABLESPACE or ALTER
INDEX.
space-type
TABLE or INDEX
TABLE is for table space, and INDEX is for
index space.
database-type
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.
SQLSTATE: 53001

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.

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 *