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.

 

DB2 SQL Errors Codes and Error Messages and Warnings from Error -639 to -643

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-639, SQLSTATE: 56027, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
A NULLABLE COLUMN OF A
FOREIGN KEY WITH A DELETE RULE
OF SET NULL CANNOT BE A
COLUMN OF THE KEY OF A
PARTITIONED INDEX
Explanation: A partition key of the clustering index
cannot be updated. Therefore, a foreign key column
with a delete rule of SET NULL cannot be a column of
a partition key if that column is nullable. If this error
occurs for an ALTER TABLE operation, the foreign key
cannot be created. If this error occurs for a CREATE
INDEX operation, the index cannot be created.
System action: The statement cannot be executed.
Programmer response: Review the delete rule of the
referential constraint and the partition keys for the
index. Do one of the following:
v If the operation in error was CREATE INDEX, either
change the index partition key definition or drop and
redefine the referential constraint with a different
delete rule.
v If the operation in error was ALTER TABLE, change
the referential delete rule so that all nullable index
keys are not part of the foreign keys.
SQLSTATE: 56027

Error: DB2 SQL Error: SQLCODE=-640, SQLSTATE: 56089, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
LOCKSIZE ROW CANNOT BE
SPECIFIED BECAUSE TABLE IN THIS
TABLESPACE HAS TYPE 1 INDEX
Explanation: If LOCKSIZE ROW is specified for a
table space, all indexes on tables in the table space
must be type 2 indexes. The following SQL statement
identifies all the type 1 indexes:
SELECT I.CREATOR, I.NAME
FROM SYSIBM.SYSINDEXES I,
SYSIBM.SYSTABLES T
WHERE INDEXTYPE = ‘ ‘
AND T.TSNAME = ‘table_space_name’
AND T.DBNAMe = ‘database_name’
AND T.CREATOR = I.TBCREATOR
AND T.NAME = I.TBNAME;
where ‘table_space_name’ is the name of the table space
that is to be altered; ‘database_name’ is the name of the
database that contains the table space.
System action: The statement cannot be executed.
Programmer response: Since the LOCKSIZE ROW on
the table space and the type 1 indexes conflict, either
use the ALTER INDEX statement to convert all type 1
indexes to type 2 indexes or use another LOCKSIZE
option.
SQLSTATE: 56089

Error: DB2 SQL Error: SQLCODE=-643, SQLSTATE: 54024, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
A CHECK CONSTRAINT OR THE
VALUE OF AN EXPRESSION FOR A
COLUMN OF AN INDEX EXCEEDS
THE MAXIMUM ALLOWABLE
LENGTH KEY EXPRESSION
Explanation: The definition of a check constraint or
expression of an index column exceeds the maximum
allowable length:
v A check constraint exceeded 3800 UTF-8 bytes.
Redundant blank spaces are excluded from this limit.
v A value for an expression for an index exceeded 4000
UTF-8 bytes.
System action: The CREATE TABLE or ALTER TABLE
statement failed. The statement cannot be executed.
Programmer response: Change the constraint or
expression so that it does not exceed the maximum
allowable limit. If it is a check constraint, rewrite the
check constraint definition so that it is less than 3800
UTF-8 bytes. You might need to divide a the check
constraint into two or more smaller check constraints.
SQLSTATE: 54024

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.

 

DB2 SQL Errors Codes and Error Messages and Warnings from Error -636 to -638

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-636, SQLSTATE: 56016, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
RANGES SPECIFIED FOR PARTITION
part-num ARE NOT VALID
Explanation: The ranges specified for partition
part-num are not valid for one of the following reasons
v The partitioning key values specified in the limit key
value specifications were not in either ascending or
descending order.
v All of the columns in the partitioning key are
ascending, and a constant or MINVALUE was
specified following MAXVALUE in the limit key
value specification for the partition. Once
MAXVALUE is specified, all subsequent columns
must be MAXVALUE.
v All of the columns in the partitioning key are
descending, and a constant or MAXVALUE was
specified following MINVALUE in the limit key
value specification for the partition. Once
MINVALUE is specified, all subsequent columns
must be MINVALUE.
System action: The statement cannot be executed.
User response: Correct the range partitioning
specifications in the statement for the identified
partition.
SQLSTATE: 56016

Error: DB2 SQL Error: SQLCODE=-637, SQLSTATE: 42614, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
DUPLICATE keyword KEYWORD OR
CLAUSE
Explanation: The SQL statement contains a duplicate
specification for the keyword keyword. For example:
v DEFAULT, UNIQUE, and PRIMARY can only be
specified once in a column definition.
v UNIQUE and PRIMARY cannot both be specified for
the same column definition.
v PRIMARY can only be specified once in a CREATE
TABLE statement.
v The attribute-string specified in the ATTRIBUTES
clause of the PREPARE statement cannot specify an
option more than once.
v ATTRIBUTE ENCRYPTION can only be specified
once in a TRUSTED CONTEXT definition.
v There are more than one xquery-context-item-expression
in the PASSING clause of an XMLQUERY or
XMLEXISTS.
v WHEN MATCHED and WHEN NOT MATCHED
clauses cannot be specified more than once in a
MERGE statement.
v SKIP LOCKED DATA clause cannot be specified
more than once for:
– all clauses in select-stmt
– SELECT INTO statements
– search UPDATE statements
– search DELETE statements
System action: The statement cannot be processed.
Programmer response: Correct the statement by
removing duplicate clauses.
SQLSTATE: 42614

Error: DB2 SQL Error: SQLCODE=-638, SQLSTATE: 42601, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
TABLE table-name CANNOT BE
CREATED BECAUSE COLUMN
DEFINITION IS MISSING
Explanation: The CREATE TABLE statement does not
contain any column definition.
System action: The SQL statement cannot be executed.
Programmer response: Add column definition to the
statement.
SQLSTATE: 42601

Above are list of DB2 SQL Errors and Warnings from Error -636 to-638 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.

 

DB2 SQL Errors Codes and Error Messages and Warnings from Error -633 to -635

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-633, SQLSTATE: 42915, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE DELETE RULE MUST BE delete-rule
Explanation: The code is used to report that the
‘delete-rule’ specified in a FOREIGN KEY clause of the
ALTER TABLE statement is invalid. The indicated
‘delete-rule’ is required because:
v A self-referencing constraint must have a ‘delete-rule’
of CASCADE or NO ACTION.
v The relationship would cause the table to be
delete-connected to the same table through multiple
paths and such relationships must have the same
‘delete-rule’.
System action: The statement cannot be executed.
Programmer response: Change the ‘delete rule’ in the
FOREIGN KEY clause.
SQLSTATE: 42915

Error: DB2 SQL Error: SQLCODE=-634, SQLSTATE: 42915, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE DELETE RULE MUST NOT BE
CASCADE
Explanation: The code is used to report that the
CASCADE delete rule specified in the FOREIGN KEY
clause of an ALTER TABLE statement is invalid
because:
v The relationship would form a cycle that would
cause a table to be delete-connected to itself.
v The relationship would cause another table to be
delete-connected to the same table through multiple
paths with different delete rules or with a delete rule
equal to SET NULL.
System action: The statement cannot be executed.
Programmer response: Change the delete rule.
SQLSTATE: 42915

Error: DB2 SQL Error: SQLCODE=-635, SQLSTATE: 42915, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE DELETE RULES CANNOT BE
DIFFERENT OR CANNOT BE SET
NULL
Explanation: The code is used to report that the delete
rules specified in two FOREIGN KEY clauses of the
CREATE TABLE statement are invalid because the table
would be delete-connected to the same table through
multiple paths involving relationships with different
delete rules or with delete rules of SET NULL.
System action: The statement cannot be executed.
Programmer response: Change the delete rule.
SQLSTATE: 42915

Above are list of DB2 SQL Errors and Warnings from Error -633 to -635 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.

 

DB2 SQL Errors Codes and Error Messages and Warnings from Error -629 to 632

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-629, SQLSTATE: 42834, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
SET NULL CANNOT BE SPECIFIED
BECAUSE FOREIGN KEY name
CANNOT CONTAIN NULL VALUES
Explanation: The code SET NULL option of the
indicated FOREIGN KEY clause is invalid because no
column of the key allows null values. The name is the
constraint-name specified in the FOREIGN KEY clause
or, if a constraint-name was not specified, the first
column-name specified in the clause.
System action: The statement cannot be processed.
Programmer response: Change a column of the key to
allow null values or change the delete rule.
SQLSTATE: 42834

Error: DB2 SQL Error: SQLCODE=-631, SQLSTATE: 54008, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
FOREIGN KEY name IS TOO LONG OR
HAS TOO MANY COLUMNS
Explanation: This code is used to report that the sum
of the length attributes of the columns identified in the
indicated FOREIGN KEY clause is greater than 255
bytes or the number of columns identified is greater
than 64. The ‘name’ is the constraint-name specified in
the FOREIGN KEY clause or, if a constraint-name was
not specified, the first column-name specified in the
clause.
System action: The statement cannot be executed.
Programmer response: The table definition must be
modified to conform to the system-imposed limit of the
sum of the length attributes of the columns identified
in the PRIMARY KEY clause.
SQLSTATE: 54008

Error: DB2 SQL Error: SQLCODE=-632, SQLSTATE: 42915, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE TABLE CANNOT BE DEFINED
AS A DEPENDENT OF table-name
BECAUSE OF DELETE RULE
RESTRICTIONS
Explanation: This code is used to report that the
object of an ALTER TABLE statement cannot be defined
as a dependent of the indicated table because either:
v The relationship would form a cycle that would
cause the table to be delete-connected to itself.
v The relationship would cause the table to be
delete-connected to the indicated table through
multiple paths and the delete rule of the existing
relationship is SET NULL.
The error is due to the delete rules of existing
relationships, not the delete rule specified in the
FOREIGN KEY clause of the ALTER TABLE statement.
System action: The statement cannot be executed.
Programmer response: Eliminate the particular
FOREIGN KEY clause from the ALTER or CREATE
TABLE statement.
SQLSTATE: 42915

Above are list of DB2 SQL Errors and Warnings from Error -629 to -632 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.

 

DB2 SQL Errors Codes and Error Messages and Warnings from Error -625 to -627

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-625, SQLSTATE=55014, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
TABLE table-name DOES NOT HAVE
AN INDEX TO ENFORCE THE
UNIQUENESS OF THE PRIMARY OR
UNIQUE KEY
Explanation: The ALTER TABLE statement is invalid
for one of the following reasons:
v The table does not have a unique index with a key
that is identical to the nominated primary or unique
key.
v A unique index exists, but the index is already being
used to enforce referential constraints. In this case,
DB2 does not choose the index to enforce the
primary or unique key.
System action: The statement cannot be executed.
Programmer response: Make sure the key list
specified on the ALTER TABLE statement identifies an
existing unique index of the table that is not already
enforcing referential constraints.
SQLSTATE: 55014

Error: DB2 SQL Error: SQLCODE=-626, SQLSTATE=55015, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE ALTER STATEMENT IS NOT
EXECUTABLE BECAUSE THE PAGE
SET IS NOT STOPPED
Explanation: An ALTER statement specifies an ADD
PART, BUFFERPOOL, USING, PRIQTY, SECQTY,
ERASE, or GBPCACHE clause, but the page set is not
stopped.
System action: The SQL statement was not executed.
Programmer response: Stop the page set and resubmit
the statement.
SQLSTATE: 55015

Error: DB2 SQL Error: SQLCODE=-627, SQLSTATE=55016, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE ALTER STATEMENT IS INVALID
BECAUSE THE TABLE SPACE OR
INDEX HAS USER-MANAGED DATA
SETS
Explanation: This error is issued for the following
reasons:
v a CREATE or ALTER statement specified a PRIQTY,
SECQTY, or ERASE clause, USING STOGROUP was
not specified, and the table space or index has
user-managed data sets. The primary and secondary
space allocation of a user-managed data set cannot
be altered by means of an ALTER statement.
v an ALTER statement attempted to define a clone
table for a base table that is in a table space that has
user-managed data sets. A clone table cannot be
defined for a base table that is in a table space that
has user-managed data sets.
System action: The SQL statement cannot be executed.
Programmer response: Verify that the correct table,
index, or partition is specified.
SQLSTATE: 55016

Above are list of DB2 SQL Errors and Warnings from Error -625 to -627 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.

 

DB2 SQL Errors Codes and Error Messages and Warnings from Error -621 to -624

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-621, SQLSTATE=58001, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
DUPLICATE DBID dbid WAS
DETECTED AND PREVIOUSLY
ASSIGNED TO database-name
Explanation: The current database being created was
assigned a DBID of ‘dbid’, which is identical to the
DBID assigned to database ‘database-name’. An
inconsistency exists between the DB2 catalog and
directory.
System action: The statement cannot be executed. No
new object was created, and the existing object was not
altered or modified.
System programmer response: If you suspect an error
in DB2, refer to Part 2 of Diagnosis Guide and Reference
for information on identifying and reporting the
problem.
Programmer response: Notify the system programmer.
The inconsistency must be corrected before CREATE
DATABASE will be successful.
SQLSTATE: 58001

Error: DB2 SQL Error: SQLCODE=-622, SQLSTATE=56031, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
FOR MIXED DATA IS INVALID
BECAUSE THE MIXED DATA INSTALL
OPTION IS NO
Explanation: FOR MIXED DATA is specified in a
column description of a CREATE or ALTER TABLE, a
CREATE FUNCTION, or a CREATE PROCEDURE
statement, but the MIXED DATA install option is set to
NO. FOR MIXED DATA is valid only when the MIXED
DATA install option is set to YES.
System action: The statement is not executed.
Programmer response: Either change the install option
or the FOR clause. If the install option is correctly set to
NO, the allowable FOR clause options are BIT and
SBCS.
SQLSTATE: 56031

Error: DB2 SQL Error: SQLCODE=-623, SQLSTATE=55012, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
A CLUSTERING INDEX ALREADY
EXISTS ON TABLE table-name
Explanation: A given table can have only one cluster
index. This error can occur for the following reasons:
v A CREATE INDEX statement would create a second
cluster index on the specified table.
v An ALTER INDEX statement specified the CLUSTER
clause, but there is already a clustering index defined
for the table.
System action: The statement cannot be executed.
Programmer response: Check to determine the
identity and validity of the existing cluster index on the
object table. Alternatively, consider creating the index
without the CLUSTER attribute.
SQLSTATE: 55012

Error: DB2 SQL Error: SQLCODE=-624, SQLSTATE=42889, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
TABLE table-name ALREADY HAS A
PRIMARY KEY OR UNIQUE
CONSTRAINT WITH SPECIFIED
COLUMNS
Explanation: The code is used to report that a primary
key or unique key cannot be defined in an ALTER
TABLE statement because the table either:
v Already has a primary key, or
v Has an existing unique constraint with the same
definition (same set of columns specified) as the new
key.
System action: The statement cannot be run.
Programmer response: Do not attempt to define a
table with more than one primary key, or a unique
constraint that duplicates the definition of an existing
unique constraint.
SQLSTATE: 42889

Above are list of DB2 SQL Errors and Warnings from Error -621 to -624 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.

 

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.

 

DB2 SQL Errors Codes and Error Messages and Warnings from Error -614 to -616

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-614, SQLSTATE=54008, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE INDEX CANNOT BE CREATED
OR ALTERED, OR THE LENGTH OF A
COLUMN CANNOT BE CHANGED
BECAUSE THE SUM OF THE
INTERNAL LENGTHS OF THE
COLUMNS FOR THE INDEX IS
GREATER THAN THE ALLOWABLE
MAXIMUM
Explanation: The index could not be created or the
length of a column cannot be changed because the sum
of the internal lengths of the key columns would
exceed the allowable maximum. The maximum
permitted key length is as follows:
v For PADDED indexes, the sum of the length
attributes of the columns must not be greater than
2000-n, where n is the number of columns that
contain null values.
v For NOT PADDED indexes, the sum of the length
attributes of the columns must not be greater than
2000-n-2m, where n is the number of nullable
columns and m is the number of varying length
columns.
System action: The statement cannot be executed. The
specified index was not created or the length of the
column was not changed.
Programmer response: The definition for the index
must be modified (possibly by eliminating one or more
key columns) to reduce the length of the key to the
permitted maximum. Refer to chapter 2 of SQL
Reference if you require a complete explanation of other
possible maximum key lengths and how they are
computed.
SQLSTATE: 54008

Error: DB2 SQL Error: SQLCODE=-615, SQLSTATE=55006, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
operation-type IS NOT ALLOWED ON A
PACKAGE IN USE
Explanation: The operation ‘operation-type’ cannot be
performed because the package is in use by the same
application process.
operation-type
Type of bind operation (BIND, REBIND or
DROP).
System action: The BIND, REBIND, or DROP
operation on the package is not performed.
Programmer response: Change the application to
invoke the BIND, REBIND or DROP operation when
the package is not use by the same application process.
SQLSTATE: 55006

Error: DB2 SQL Error: SQLCODE=-616, SQLSTATE=42893, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
obj-type1 obj-name1 CANNOT BE
DROPPED BECAUSE IT IS
REFERENCED BY obj-type2 obj-name2
Explanation: Some types of objects cannot be dropped
if there are other objects which are dependent upon
them. For example, a storage group cannot be dropped
if there are one or more existing table spaces that use
that storage group.
Execution of the specified DROP statement would drop
object obj-name1 of type obj-type1 on which object
obj-name2 of type obj-type2 is dependent.
System action: The statement cannot be processed.
The specified object was not dropped.
Programmer response: Verify that the object specified
in the DROP statement was, indeed, the object to be
dropped. If so, all the existing objects that have a
dependency on that object must first be dropped.
A LOB table space cannot be dropped when an
association exists between it and another table space.
The associated base table must be dropped first.
A populated auxiliary table and its index can only be
dropped by dropping the associated base table.
A trigger package cannot be explicitly dropped. It can
only be dropped by dropping the associated trigger
with a DROP TRIGGER statement or by dropping the
triggering table.
SQLSTATE: 42893

Above are list of DB2 SQL Errors and Warnings from Error -614 to -616 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.

 

DB2 SQL Errors Codes and Error Messages and Warnings from Error -611 to -613

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-611, SQLSTATE=53088, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
ONLY LOCKMAX 0 CAN BE
SPECIFIED WHEN THE LOCK SIZE OF
THE TABLESPACE IS TABLESPACE OR
TABLE
Explanation: This message is issued when:
v The LOCKSIZE of the table space is TABLESPACE or
TABLE, and LOCKMAX is being altered to or created
as a nonzero value.
v The LOCKSIZE of the table space is being altered to
TABLESPACE or TABLE, and LOCKMAX is being
altered to or created as a nonzero value.
If LOCKSIZE is TABLESPACE or TABLE, LOCKMAX
must be 0 because lock escalation is not supported
from these levels.
System action: The statement cannot be executed.
Programmer response: Do one of the following:
v Reissue the statement with LOCKMAX 0.
v Alter the LOCKSIZE of the table space to a value
other than TABLESPACE or TABLE.
SQLSTATE: 53088

Error: DB2 SQL Error: SQLCODE=-612, SQLSTATE=42711, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
identifier IS A DUPLICATE NAME
Explanation: Column names must be unique within
an index, a table, a view, or in the UPDATE OF clause
of a trigger definition. The following situations might
cause this error:
v For a CREATE INDEX, CREATE TABLE, CREATE
VIEW or ALTER TABLE statement, the same
column-name was specified for two or more columns
of the index, table, view.
v For a CREATE or ALTER TABLE statement, a
constraint specified an XML column. The constraint
definition contains an expression that invokes the
XMLQUERY function or uses the XMLEXISTS
predicate.
v For a CREATE TRIGGER statement, the UPDATE OF
clause specified the same column name more than
once.
v The PASSING clause of an XMLQUERY, or
XMLEXISTS contains two arguments with the same
name.
v The SQL data change statement uses an include
column, and the column-name specified is the same
as another column-name of the target table or view
or another include column.
v An XMLQUERY, or XMLEXISTS argument list
contains two arguments with the same name.
Column names must be unique within an index, a
table, a view, or in the UPDATE OF clause of a trigger
definition. Additionally, a column cannot be specified
in more than one ALTER TABLE clause except if it is
specified in an ALTER COLUMN clause and ADD
CHECK CONSTRAINT clause.
System action: The statement cannot be processed
Programmer response: Correct the CREATE statement
to specify unique names for each of the columns of the
index, table, view, or the columns in the UPDATE OF
clause of a trigger definition. Correct the ALTER
statement to specify unique names for each of the
ALTER COLUMN clauses. This error can also occur on
CREATE TABLE when a column list of a PRIMARY
KEY, FOREIGN KEY, or UNIQUE clause contains two
or more occurrences of the same column name.
SQLSTATE: 42711

Error: DB2 SQL Error: SQLCODE=-613, SQLSTATE=54008, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE PRIMARY KEY OR A UNIQUE
CONSTRAINT IS TOO LONG OR HAS
TOO MANY COLUMNS
Explanation: This error code results from a problem
with the columns that are defined for a PRIMARY KEY
or UNIQUE constraint. The number of columns is
greater than 64, or the sum of the column length
attributes is greater than the number allowed for the
type of index.
If the failing statement was an ALTER TABLE
statement that included the SET DATA TYPE clause to
alter the definition of an existing column, a column
being changed is part of a unique or primary
constraint. The new sum of the lengths of the columns
of the keys exceeds 255-n, where n is the number of
columns allowing nulls. This sum currently exceeds the
maximum number that is allowed.
If the failing statement was an ALTER TABLE
statement with a PARTITIONING KEY specification,
only 64 columns can be specified, and the combined
lengths of all columns specified in the PARTITIONING
KEY clause exceeds the maximum length of 255-n,
where n is the number of columns that can contain null
values.
System action: The CREATE or ALTER statement
cannot be executed. The specified table cannot be
created or altered.
Programmer response: Change the table definition to
keep within the prescribed limits.
SQLSTATE: 54008

Above are list of DB2 SQL Errors and Warnings from Error -611 to -613 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.

 
1 2 3 13