DB2 エラーコードの解釈方法

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

When DB2 dies, it'll dump its error codes into 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.

最終更新日: 2015 年 10 月 7 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.