DB2 SQL Errors Codes and Error Messages and Warnings from Error +20245 to +20271

SQLServerF1

Error: DB2 SQL Error: SQLCODE=+20245, SQLSTATE=01663, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
NOT PADDED CLAUSE IS IGNORED
FOR INDEXES CREATED ON
AUXILIARY TABLES
Explanation: The NOT PADDED clause is ignored on
the CREATE INDEX statement because auxiliary
indexes are always PADDED.
System action: The option is ignored; processing
continues.
Programmer response: Remove the NOT PADDED
clause to avoid this warning.
SQLSTATE: 01663

Error: DB2 SQL Error: SQLCODE=+20270, SQLSTATE=01664, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
OPTION NOT SPECIFIED
FOLLOWING ALTER PARTITION
CLAUSE
Explanation: An ALTER INDEX statement, which
included the ALTER PARTITION clause, did not
contain an option following the ALTER PARTITION
keywords.
System action: The SQL statement is processed.
Programmer response: Specify a partition option after
the ALTER PARTITION keywords to avoid this
warning in the future. For an ALTER INDEX statement,
if partition-element is specified, specify either the
ENDING clause of:
v partition-element
v using-block
v free-block
v gbcaches-block
SQLSTATE: 01664

Error: DB2 SQL Error: SQLCODE=+20271, SQLSTATE=01665, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE NAME AT ORDINAL POSITION
position-number IN THE STATEMENT,
WITH NAME column-name, MAY BE
TRUNCATED.
Explanation: At least one column name in the
described statement might be truncated. The column
name was either too long, or became too long after
code page conversion.
position-number
The ordinal position number of the name that
might have been truncated. For the describe
output of a prepared query, the ordinal
position is relative to the select list column of
the query.
column-name
The name that was truncated.
The column name that is stored in the catalog will not
be truncated, but the length of the column name is
limited when using the SQLDA structure.
System action: Processing continues.
User response: If the exact name is significant, do one
of the following:
v For the name of a result column that is specified in
an AS clause, change the name in the AS clause so
that the result column has a shorter name.
v For the name of a column in a table or view, drop
and re-create the table or view so that the column
has a shorter name, or provide a shorter name for
the result column in the query with an AS clause.
v For the name of a column in a table, use the ALTER
TABLE statement to rename the column so that it has
a shorter name.
SQLSTATE: 01665

Above are list of DB2 SQL Errors and Warnings from Error +20245 to +20271 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 +20141 to +20237

SQLServerF1

Error: DB2 SQL Error: SQLCODE=+20141, SQLSTATE=01004, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
TRUNCATION OF VALUE WITH
LENGTH length OCCURRED FOR
hv-or-parm-number
Explanation: A value that was assigned to a host
variable or parameter was truncated. However, the
length of the value that was truncated is too large to be
returned in the indicator variable. This situation can
occur when truncation occurs on assignment of:
v a value to a parameter of a remote stored procedure
if the value being truncated is greater than 127 bytes.
In this case, the indicator variable will contain a
value of 127.
v a LOB value to a host variable if the value being
truncated is greater than 32K bytes. In this case, the
indicator variable will contain a value of 32K.
In these cases, the actual length of the truncated value
cannot be returned to the application that uses the
indicator variable. The actual length of the value is
returned as message token length.
System action: The assignment was made, but the
data was truncated.
Programmer response: Change the declaration of
hv-or-parm-number to avoid truncation.
SQLSTATE: 01004

Error: DB2 SQL Error: SQLCODE=+20187, SQLSTATE=01656, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
ROLLBACK TO SAVEPOINT CAUSED
A NOT LOGGED TABLE SPACE TO BE
PLACED IN THE LPL
Explanation: An application issued a ROLLBACK, but
uncommitted changes existed for a table space defined
with the NOT LOGGED logging attribute. DB2 cannot
undo changes made to not logged table spaces because
no log records were written due to the logging attribute
of the table space. The table space is placed in the LPL
so that other concurrently running agents are not able
to see the data that cannot be rolled back. The table
space is also marked recover pending because the table
space has been modified.
System action: The ROLLBACK TO SAVEPOINT was
performed, however changes that were made to not
logged table spaces have not been undone.
Programmer response: Avoid making changes to a not
logged table space within the span of a savepoint to
which you intend to rollback.
To remove a table space from the LPL and reset recover
pending, use one of the following options:
v REFRESH TABLE to repopulate a Materialized Query
Table, but only if the Materialized Query Table is
alone in its table space. If the table, including
Materialized Query Tables, is not alone in its table
space, a utility must be used to reset the table space
and remove it from recover pending.
v RECOVER utility, to recover either to currency or to
a prior image copy
v LOAD REPLACE utility or LOAD REPLACE PART
utility:
– With an input dataset to empty the table space
and repopulate the table
– Without an input dataset to empty the table space
to prepare for one or more insert operations to
repopulate the table
v Drop and recreate the table space and repopulate the
table.
v DELETE without a WHERE clause to empty the
table. When the table space is segmented or
universal, the table is alone in its table space and the
table does not have a VALIDPROC, referential
constraints, delete Triggers, or a SECURITY LABEL
column (or has this column, but multilevel security is
not in effect).
v TRUNCATE TABLE to empty the table. When the
table space is segmented or universal, the table is
alone in its table space and the table does not have a
VALIDPROC, referential constraints, or a SECURITY
LABEL column (or has this column, but multilevel
security with row level granularity is not in effect).
Important: If the table, materialized query table or not,
is not alone in its table space, a utility must be used to
reset the table space and remove it from recover
pending.
SQLSTATE: 01656

Error: DB2 SQL Error: SQLCODE=+20237, SQLSTATE=02504, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
FETCH PRIOR ROWSET FOR CURSOR
cursor-name RETURNED A PARTIAL
ROWSET
Explanation: A FETCH PRIOR ROWSET statement
was issued, but there were not enough rows prior to
the current cursor position to reposition the cursor on a
full rowset. The cursor has been positioned on a partial
rowset. If a target was specified, then data has only
been returned for the number of rows that were
actually fetched for the partial rowset.
System action: The cursor is positioned on a partial
rowset.
Programmer response: Analyze the situation to
determine if anything should be rolled back.
SQLSTATE: 02504

Above are list of DB2 SQL Errors and Warnings from Error +20141 to +20237 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 +20002 to +20122

SQLServerF1

Error: DB2 SQL Error: SQLCODE=+20002, SQLSTATE=01624, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE clause SPECIFICATION IS
IGNORED FOR OBJECT object-name
Explanation: This message is issued in response to a
clause specification that was ignored on a CREATE or
ALTER statement:
v GBPCACHE: The GBPCACHE clause specified
conflicts with the group buffer pool specification
GBPCACHE NO.
v PADDED: The PADDED clause was specified on a
CREATE or ALTER of index object-name that does not
have any varying-length character or graphic
columns in the index key. The PADDED attribute
does not apply in this case and is ignored.
v NOT PADDED: The NOT PADDED clause was
specified on a CREATE or ALTER of index
object-name that does not have any varying-length
character or graphic columns in the index key. The
NOT PADDED attribute does not apply in this case
and is ignored.
System action: The statement is processed.
User response: If you want to use one of the
GBPCACHE options other than NONE, you must alter
the table space or index to use a group buffer pool that
is defined with GBPCACHE YES. For index padding,
no action is necessary as the PADDED or NOT
PADDED clause was ignored.
To stop receiving this message, remove the PADDED or
NOT PADDED clause from the CREATE or ALTER
index statement.
SQLSTATE: 01624

Error: DB2 SQL Error: SQLCODE=+20007, SQLSTATE=01602, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
USE OF OPTIMIZATION HINTS IS
DISALLOWED BY A DB2 SUBSYSTEM
PARAMETER. THE SPECIAL
REGISTER ‘OPTIMIZATION HINT’ IS
SET TO AN EMPTY STRING.
Explanation: DB2 is not enabled to use optimization
hints. The special register OPTIMIZATION HINT is set
to an empty string.
System action: The user-specified optimization hints
are ignored. The access path is determined without the
use of hints and processing continues normally.
Programmer response: Enable the use of
OPTIMIZATION HINT by changing the value of
OPTIMIZATION HINTS on the DB2 Installation panel
DSNTIP8.
If, after further consideration, you do not want to use
an OPTIMIZATION HINT, use the SET CURRENT
OPTIMIZATION HINT statement to disable the use of
optimization hints.
Specify an empty string, or a string of blanks, on a SET
CURRENT OPTIMIZATION HINT statement to cause
DB2 to use normal optimization techniques and ignore
optimization hints.
SQLSTATE: 01602

Error: DB2 SQL Error: SQLCODE=+20122, SQLSTATE=01644, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
DEFINE NO OPTION IS NOT
APPLICABLE IN THE CONTEXT
SPECIFIED
Explanation: The DEFINE NO option was specified,
however it is not applicable in the context specified.
DEFINE NO was specified in one of the following
situations:
v a CREATE INDEX statement that included the VCAT
clause
v a CREATE INDEX statement for a non-empty table
v a CREATE INDEX statement on a declared
temporary table
v a CREATE LOB TABLESPACE statement
v a CREATE TABLESPACE statement that included the
VCAT clause
v a CREATE INDEX statement for a table that has a
defined clone
System action: DB2 ignored the DEFINE NO option
and created the object with the DEFINE YES option
instead.
SQLSTATE: 01644

Above are list of DB2 SQL Errors and Warnings from Error +20002 to +20122 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 +807 to +883

SQLServerF1

Error: DB2 SQL Error: SQLCODE=+807, SQLSTATE=01554, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE RESULT OF DECIMAL
MULTIPLICATION MAY CAUSE
OVERFLOW
Explanation: An arithmetic expression contains a
decimal multiplication that may cause an overflow
condition when the statement is executed. The problem
may be corrected by restructuring the arithmetic
expression so that decimal multiplication precedes
decimal division or by changing the precision and scale
of the operands in the arithmetic expression. Refer to
chapter 2 of SQL Reference for the precision and scale of
the decimal multiplication and division results.
System action: A valid package will be created if no
errors are detected.
SQLSTATE: 01554

Error: DB2 SQL Error: SQLCODE=+863, SQLSTATE=01539, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE CONNECTION WAS
SUCCESSFUL BUT ONLY SBCS WILL
BE SUPPORTED
Explanation: The target AS supports only the DB2
SBCS CCSID. The DB2 Mixed CCSID or GRAPHIC
CCSID or both are not supported by the target AS. DB2
character data sent to the target AS must be restricted
to SBCS.
System action: The CONNECT statement is
successful. The release level of the target AS has been
placed into the SQLERRP field of the SQLCA (see SQL
Reference for the CONNECT statement).
Programmer response: Do not execute any SQL
statements which pass either mixed data or graphic
data as input host variables.
SQLSTATE: 01539

Error: DB2 SQL Error: SQLCODE=+883, SQLSTATE=01640, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
ROLLBACK TO SAVEPOINT
OCCURRED WHEN THERE WERE
OPERATIONS THAT CANNOT BE
UNDONE, OR AN OPERATION THAT
CANNOT BE UNDONE OCCURRED
WHEN THERE WAS A SAVEPOINT
OUTSTANDING
Explanation: The operations that are referred to are
updates (inserts into or deletes from) a created global
temporary table. If this SQL warning code is received
as the result of a ROLLBACK TO SAVEPOINT
statement, the rollback is performed; however, the
changes that were made to the temporary table are not
undone. If this SQL warning code is received as the
result of an operation to a created global temporary
table, the operation is performed; however, be advised
that a savepoint is outstanding, and the update will not
be backed out if a rollback to the savepoint is
performed.
System action: The SQL statement is processed.
Programmer response: Verify that this is what you
meant.
SQLSTATE: 01640

Above are list of DB2 SQL Errors and Warnings from Error +807 to +883 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 +802 to +806

SQLServerF1

Error: DB2 SQL Error: SQLCODE=+802, SQLSTATE=01519, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
EXCEPTION ERROR exception-type HAS
OCCURRED DURING operation-type
OPERATION ON data-type DATA,
POSITION position-number
Explanation: The exception error exception-type
occurred while performing one of the following
operations on a field that has a data-type of DECIMAL,
FLOAT, SMALLINT, or INTEGER:
v ADDITION
v SUBTRACTION
v MULTIPLICATION
v DIVISION
v NEGATION
v BUILT-IN FUNCTION
The error occurred while processing an arithmetic
expression in the SELECT list of an outer SELECT
statement, and the position in the select list is denoted
by position-number. The possible exception types are:
DECIMAL OVERFLOW
A decimal overflow exception can occur when
one or more nonzero digits are lost because
the destination field in any decimal operation
is too short to contain the result.
DIVIDE EXCEPTION
A divide exception can occur on a decimal
division operation when the quotient exceeds
the specified data-field size. A zero divide
exception occurs on any division by zero,
except when the data type is DECFLOAT.
EXPONENT OVERFLOW
An exponent overflow can occur when the
result characteristic of any floating-point
operation exceeds 127 and the result fraction is
not zero, i.e. the magnitude of the result
exceeds approximately 7.2E+75.
FIXED POINT OVERFLOW
A fixed point overflow can occur during any
arithmetic operation on either INTEGER or
SMALLINT fields.
INVALID OPERATION
OUT OF RANGE
An error might occur during while processing
an input, intermediate, or final value if the
value of a parameter is out of range.
OVERFLOW
An overflow can occur during the processing
of a built-in function. If the operation-type is
FUNCTION, then the error occurred while
processing an input, intermediate, or final
value.
SUBNORMAL
UNDERFLOW
An underflow can occur during the processing
of a built-in function. If the operation-type is
FUNCTION, then the error occurred while
processing an input, intermediate, or final
value.
ZERO DIVIDE
The data type displayed in the message might indicate
the data type of the temporary internal copy of the
data. This might differ from the actual column or literal
data type due to conversions by DB2.
Attention: Parts of exception-type, data-type,
operation-type, and position-number might or might not
be returned in SQLCA, depending upon when the error
was detected.
System action: For each expression in error the
indicator variable is set to negative two (-2) to indicate
a null value returned. The data variable is unchanged.
Execution of the statement continues with all non-error
columns and expressions of the outer SELECT list
being returned. If the statement is cursor controlled
then the cursor will remain open.
Programmer response: Examine the expression for
which the warning occurred to see if the cause (or the
likely cause) of the problem can be determined. The
problem may be data-dependent, in which case it will
be necessary to examine the data that was being
processed at the time the error occurred.
See the explanation of SQLCODE -405 for allowed
ranges of numeric data types.
SQLSTATE: 01519

Error: DB2 SQL Error: SQLCODE=+806, SQLSTATE=01553, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
BIND ISOLATION LEVEL RR
CONFLICTS WITH TABLESPACE
LOCKSIZE PAGE OR LOCKSIZE ROW
AND LOCKMAX 0
Explanation: The specification of isolation level RR is
incompatible with the LOCKSIZE PAGE or LOCKSIZE
ROW and LOCKMAX 0 specification for a table space
accessed by the application. Table space locking is used
to protect the integrity of the application.
System action: A valid package/plan is created if no
errors are detected. Table space locking is used. RR
isolation level is preserved.
Programmer response: If you do not want table space
locking, use isolation level UR, CS, or RS.
SQLSTATE: 01553

Above are list of DB2 SQL Errors and Warnings from Error +802 to +806 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 +653 to +658

SQLServerF1

Error: DB2 SQL Error: SQLCODE=+653, SQLSTATE=01551, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
TABLE table-name IN PARTITIONED
TABLESPACE tspace-name IS NOT
AVAILABLE BECAUSE ITS
PARTITIONED INDEX HAS NOT
BEEN CREATED
Explanation: An attempt has been made to insert or
manipulate data in or create a view on a partitioned
table (that is, a table residing in a partitioned table
space) before the partitioned index for that table has
been created.
A table residing in a partitioned table space cannot be
referenced in any SQL manipulative statement or a
CREATE VIEW statement before the partitioned index
for that table has been created.
System action: A valid plan or package will be
created if no errors are detected. The statement is
bound dynamically on each execution of the statement.
Programmer response: For better performance, rebind
the plan or package after correcting the statement. To
correct the statement, verify that the correct table was
specified in the statement. If so, ensure that the
partitioned index for the table has been created
successfully before attempting to execute any SQL
manipulative statements that reference that table.
SQLSTATE: 01551

Error: DB2 SQL Error: SQLCODE=+655, SQLSTATE=01597, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
STOGROUP stogroup_name HAS BOTH
SPECIFIC AND NON-SPECIFIC
VOLUME IDS. IT WILL NOT BE
ALLOWED IN FUTURE RELEASES
Explanation: The CREATE or ALTER STOGROUP
statement has caused the STOGROUP with
stogroup_name to have both specific and non-specific
(‘*’) volume Ids. This warning code is used to specify
that the mixing of different types of volume Ids will
not be allowed in future releases.
System action: DB2 continues processing.
Programmer response: Plan to use either specific or
non-specific volume ids to avoid future release
migration impact. ALTER STOGROUP may be used to
drop all specific volume ids or all non-specific volume
ids.
SQLSTATE: 01597

Error: DB2 SQL Error: SQLCODE=+658, SQLSTATE=01600, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE SUBPAGES VALUE IS IGNORED
FOR THE CATALOG INDEX index-name
Explanation: Only SUBPAGES 1 is allowed for this
catalog index.
System action: The index was altered successfully
using SUBPAGES 1. If you are also altering the TYPE
option to a new value, the index is placed in recovery
pending status.
SQLSTATE: 01600

Above are list of DB2 SQL Errors and Warnings from Error +653 to +658 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 +562 to +599

SQLServerF1

Error: DB2 SQL Error: SQLCODE=+562, SQLSTATE=01560, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
A GRANT OF A PRIVILEGE WAS
IGNORED BECAUSE THE GRANTEE
ALREADY HAS THE PRIVILEGE
FROM THE GRANTOR
Explanation: At least one of the privileges in the
GRANT statement was ignored because the privilege
was already granted to the grantee by the grantor.
System action: The privileges previously granted are
ignored; all others are granted.
SQLSTATE: 01560

Error: DB2 SQL Error: SQLCODE=+585, SQLSTATE=01625, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE COLLECTION collection-id
APPEARS MORE THAN ONCE WHEN
SETTING THE special-register SPECIAL
REGISTER
Explanation: The SET statement for special register
special-register includes collection-id more than once.
System action: Duplicates are removed from the list,
and the first occurrence of collection-id is used. The
statement is executed.
Programmer response: Verify the list that contains the
duplicate. If the error is only in entering a collection-id
incorrectly that happens to duplicate another entry,
enter the collection-id correctly and reissue the
statement. If the entry is intended to be a duplicate, no
action is required.
SQLSTATE: 01625

Error: DB2 SQL Error: SQLCODE=+599, SQLSTATE=01596, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
COMPARISON FUNCTIONS ARE NOT
CREATED FOR A DISTINCT TYPE
BASED ON A LONG STRING DATA
TYPE
Explanation: Comparison functions are not created for
a distinct type based on a long string data type (BLOB,
CLOB, DBCLOB) since the corresponding function are
not available for these built-in data types.
System action: The statement is processed
successfully.
Programmer response: No action is required.
SQLSTATE: 01596

Above are list of DB2 SQL Errors and Warnings from Error +562 to +599 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 +552 to +561

SQLServerF1

Error: DB2 SQL Error: SQLCODE=+552, SQLSTATE=01542, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
auth-id DOES NOT HAVE THE
PRIVILEGE TO PERFORM
OPERATION operation
Explanation: Authorization ID auth-id has attempted
to perform the specified operation without having been
granted the authority to do so.
If you are using a trusted context, the token auth-id
might return a role instead of an authorization ID. A
role is returned if a role was in effect and the
authorization checking is performed against the role,
rather than the authorization ID of the session, when
the condition was encountered. Otherwise an
authorization ID is returned. A role is returned in the
following format as a single token:
ROLE: role-name
System action: A valid plan or package will be
created if no errors are detected. The statement is
bound dynamically on each execution of the statement.
Programmer response: For better performance, rebind
the plan or package after correcting the statement. To
correct the statement, ensure that the authorization-ID
has been granted the authority necessary to perform
the desired operation.
SQLSTATE: 01542

Error: DB2 SQL Error: SQLCODE=+558, SQLSTATE=01516, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE WITH GRANT OPTION IS
IGNORED
Explanation: The WITH GRANT option was used
where it is not valid. It cannot be used in the following
cases:
v PUBLIC was within the list of grantee authorization
IDs.
v The BINDAGENT privilege was being granted.
v The ANY package privilege on collection-id.* was
being granted.
System action: The offending privileges in the
authorization specification are granted without the
GRANT option. If the grantee is PUBLIC, all the
privileges in the authorization specification are granted
without the GRANT option.
SQLSTATE: 01516

Error: DB2 SQL Error: SQLCODE=+561, SQLSTATE=01523, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE ALTER, INDEX, REFERENCES,
AND TRIGGER PRIVILEGES
CANNOT BE GRANTED PUBLIC AT
ALL LOCATIONS
Explanation: A GRANT statement was specified with
either an ALL or ALL PRIVILEGES keyword. ALL and
ALL PRIVILEGES imply the granting of ALTER,
INDEX, REFERENCES, and TRIGGER privileges, and
these privileges cannot be granted to a remote user.
System action: DB2 executes the GRANT statement.
However, it does not grant the ALTER, INDEX,
REFERENCES, or TRIGGER privileges to PUBLIC*.
SQLSTATE: 01523

Above are list of DB2 SQL Errors and Warnings from Error +552 to +561 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 +535 to +551

SQLServerF1

Error: DB2 SQL Error: SQLCODE=+535, SQLSTATE=01591, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE RESULT OF THE POSITIONED
UPDATE OR DELETE MAY DEPEND
ON THE ORDER OF THE ROWS
Explanation: A positioned update of a primary key or
a delete from a table with a self-referencing constraint
was requested.
System action: DB2 executes the UPDATE or DELETE
statement and the contents of the table are changed.
SQLSTATE: 01591

Error: DB2 SQL Error: SQLCODE=+541, SQLSTATE=01543, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE REFERENTIAL OR UNIQUE
CONSTRAINT name HAS BEEN
IGNORED BECAUSE IT IS A
DUPLICATE
Explanation: A FOREIGN KEY clause uses the same
key and parent table as another FOREIGN KEY clause,
or a UNIQUE clause uses the same column list as
another UNIQUE or PRIMARY KEY clause. In either
case, the duplicate clause is ignored.
name is either the foreign key name or the unique
constraint name.
System action: DB2 continues processing.
Programmer response: If the duplication is an error,
correct the statement and execute it again.
SQLSTATE: 01543

Error: DB2 SQL Error: SQLCODE=+551, SQLSTATE=01548, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
auth-id DOES NOT HAVE THE
PRIVILEGE TO PERFORM
OPERATION operation ON OBJECT
object-name
Explanation: Authorization ID auth-id has attempted
to perform the specified operation on object object-name
without having been granted the proper authority to do
so. This error might also occur if the specified object
does not exist, or if the object is a read-only view (for
UPDATE, INSERT, or MERGE). Additionally, the error
may occur if auth-id is trying to create a table or view
with a schema qualifier that is a value other than
auth-id. You may create a table or view with a schema
qualifier other than auth-id other than your own
authorization ID if your authorization ID is SYSADM,
DBADM, or DBCTRL.
If you are using a trusted context, the token auth-id
might return a role instead of an authorization ID. A
role is returned if a role was in effect and the
authorization checking is performed against the role,
rather than the authorization ID of the session, when
the condition was encountered. Otherwise an
authorization ID is returned. A role is returned in the
following format as a single token:
v ROLE: role-name
If this error occurs while DB2 is creating or altering a
table involving referential constraints, this code reports
that the user does not have the necessary ALTER
privilege to perform a FOREIGN KEY, DROP
FOREIGN KEY, DROP PRIMARY KEY, or DROP
UNIQUE operation. The object-name identifies the object
table of the CREATE or ALTER TABLE statement, not
the table for which the user lacks the ALTER privilege.
System action: A valid plan or package will be
created if no errors are detected. The statement is
bound dynamically on each execution of the statement.
Programmer response: For better performance, rebind
the plan or package after correcting the statement. To
correct the statement, ensure that auth-id has been
granted the authority to perform the desired operation,
that object-name exists, and that auth-id is not trying to
create a table with a schema qualifier other than the
authorization ID.
SQLSTATE: 01548

Above are list of DB2 SQL Errors and Warnings from Error +535 to +551 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 +466 to +495

SQLServerF1

Error: DB2 SQL Error: SQLCODE=+466, SQLSTATE=0100C, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
PROCEDURE proc RETURNED num
QUERY RESULTS SETS
Explanation: The stored procedure named by proc
completed normally. The procedure returned the
number of SQL query result sets specified in num.
System action: The SQL statement is successful. The
SQLWARN9 field is set to ‘Z’.
SQLSTATE: 0100C

Error: DB2 SQL Error: SQLCODE=+494, SQLSTATE=01614, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
NUMBER OF RESULT SETS IS
GREATER THAN NUMBER OF
LOCATORS
Explanation: The number of result set locators
specified on the ASSOCIATE LOCATORS statement is
less than the number of result sets returned by the
stored procedure. The first “n” result set locator values
are returned, where “n” is the number of result set
locator variables specified on the SQL statement.
System action: The SQL statement is successful. The
SQLWARN3 field is set to ‘Z’.
Programmer response: Increase the number of result
set locator variables specified on the SQL statement.
SQLSTATE: 01614

Error: DB2 SQL Error: SQLCODE=+495, SQLSTATE=01616, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
ESTIMATED PROCESSOR COST OF
estimate-amount1 PROCESSOR
SECONDS (estimate-amount2 SERVICE
UNITS) IN COST CATEGORY
cost-category EXCEEDS A RESOURCE
LIMIT WARNING THRESHOLD OF
limit- amount SERVICE UNITS
Explanation: The prepare of a dynamic INSERT,
UPDATE, MERGE, DELETE, or SELECT SQL statement
resulted in a cost estimate that exceeded the warning
threshold value specified in the resource limit
specification table (RLST). This warning is also issued if
DB2’s cost category value was “B”, and the default
action specified in the RLF_CATEGORY_B column in
the RLST is to issue a warning.
estimate_amount1
The cost estimate (in processor seconds) if the
prepared INSERT, UPDATE, MERGE,
DELETE, or SELECT statement were to be
executed.
estimate_amount2
The cost estimate (in service units) if the
prepared INSERT, UPDATE, MERGE,
DELETE, or SELECT statement were to be
executed.
cost-category
DB2’s cost-category for this SQL statement.
The possible values are A or B.
limit-amount
The warning threshold (in service units)
specified in the RLFASUWARN column of the
RLST. If you entered any negative number for
the RLFASUWARN column, the value for
limit-amount defaults to zero.
System action: The prepare of the dynamic INSERT,
UPDATE, MERGE, DELETE, or SELECT statement was
successful. An SQLCODE -905 might be issued if the
execution of the prepared statement exceeds the
ASUTIME value specified in the RLST.
User response: If the warning is caused by an SQL
statement that is consuming too much processor
resource, attempt to rewrite the statement to perform
more efficiently. Another option is to ask the
administrator to increase the warning threshold value
in the RLST.
Programmer response: Ensure that there is application
logic to handle the warning to either allow the
statement to execute or to stop the statement from
being executed. If this SQLCODE was returned because
the cost category value is “B”, it might be that the
statement is using parameter markers or that some
statistics are not available for the referenced tables and
columns. Make sure the administrator has run the
utility RUNSTATS on the referenced tables. It might
also be that UDFs will be invoked when the statement
is executed, or for INSERT, UPDATE, MERGE, or
DELETE statements that triggers are defined on the
changed table. Check the DSN_STATEMNT_TABLE or
the IFCID 22 record for this statement to find the
reasons this SQL statement has been put in cost
category “B”.
SQLSTATE: 01616

Above are list of DB2 SQL Errors and Warnings from Error +466 to +495 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 10 11 12 13