DB2 Error Descriptions
Some DB2® errors are more
common than others, such as DB2 errors
related to non-nullable columns and foreign key constraints. For these
types of DB2 errors, additional
information is included in the error description value written to
the CSV log file. The following information is logged for these DB2 error types:
- non-nullable columns
- These types of errors are caused when DB2 attempts to insert a null value into a non-nullable column. In this case, DB2 error An insert or update value is null, but the column cannot contain null values, with an SQL state value of 23502, is reported. The names of all non-nullable columns are included in the error description.
- foreign key constraints
- These types of errors are caused when DB2 attempts to insert a record into a table that contains a foreign key and the values provided for the foreign key are not present in the parent table. In this case, DB2 error The insert or update value of a foreign key is invalid, with an SQL state value of 23503, is reported. The name of the foreign key constraint that caused the error is included in the error description.