DB2 SQL Errors Codes and Error Messages and Warnings from Error +535 to +551
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
System action: DB2 executes the UPDATE or DELETE
statement and the contents of the table are changed.
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
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
System action: DB2 continues processing.
Programmer response: If the duplication is an error,
correct the statement and execute it again.
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
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
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.
Information about DB2 SQL Error Codes and Error Messages on Windows, Linux and Z/OS Operating Systems.