Confluence Docs 3.0 : Interpreting DB2 error codes This page last changed on Aug 01, 2006 by david.soul@atlassian.com. 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.

Document generated by Confluence on Nov 05, 2009 23:34