This documentation relates to an early version of Confluence.
View this page in the current documentation or visit the current documentation home.

Interpreting DB2 error codes

All Versions
Click for all versions
Confluence 2.7 Documentation

Index

When DB2 dies, it'll dump its error codes out in the SQL Exception:

DB2 SQL error: SQLCODE: -803, SQLSTATE: 23505

You can find the meaning of the error code from the db2 command prompt with "? sqlxxxx" where xxxx is the SQLCODE from the error message:

[db2inst1@matilda db2inst1]$ db2 ? sql-803

SQL0803N One or more values in the INSERT statement, UPDATE
statement, or foreign key update caused by a DELETE
statement are not valid because the primary key, unique
constraint or unique index identified by
"<index-id>" constrains table "<table-name>" from
having duplicate rows for those columns.

Explanation:

The INSERT or UPDATE object table "<table-name>" is constrained
by one or more UNIQUE indexes to have unique values in certain
columns or groups of columns. Alternatively, a DELETE statement
on a parent table caused the update of a foreign key in a...

(and so on for about three more pages of text...)

You may also like to use the SQL Message Finder to find information about iSeries SQL messages. You can search by message ID, SQLCODE, or SQLSTATE value. You can also select an SQLSTATE class code.

There is also an online reference for SQL Messages and Codes which is quite useful.

Labels

ibm ibm Delete
db2 db2 Delete
error error Delete
exception exception Delete
sql sql Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.