IBM DB2 for i error messages using short column na

2019-07-07 02:20发布

问题:

Note this question is specific to "IBM DB2 for i", the IBM i operating system's version of DB2.

The below screenshot shows a purposely erroneous INSERT statement that produces an SQL error of SQL0407.

My question... Is there a DB2, JDBC, or other setting I can alter so the long column names are used in the error vs. the cryptic short ones? Note I used the long column names in the INSERT statement.

回答1:

Carol Ramler, DB2 for i Senior Software Engineer at IBM, responded with this:

In this situation it is the low level database manager code that is generating the error and it does not fill in the long column name due to historical and performance reasons.

Given her title I trust she is right :-)



回答2:

After looking over the JDBC properties documentation on InfoCenter ... Have you tried the JDBC properties of "errors"="full" and/or "extended metadata" = "true"?