20 Sep 2009
DB2 Error Codes
Errors when running Control Centre
If you encounter an error dialog stating db2javit : rc - 9505 when starting the control centre, it’s possible you’re running Windows Vista/Windows 7. If so, this might be a permissions problem.
Run the control centre as administrator, by right-clicking the icon and selecting Run as administrator
SQL errors
| SQLCODE | SQLSTATE | Cause |
|---|---|---|
| -7 | 42601 | Special characters, e.g. \n or & in SQL |
| -180 | 22007 | Date/Time/Timestamp in invalid format |
| -104 | 42601 | I had this when a field was missing a value, e.g field= |
| -204 | 42704 | Invalid table name |
| -206 | 42703 | Invalid field name |
| -408 | 42821 | Bad use of quotes in field=. E.g field='1' for integer (example of incorrect style. |
| -530 | 23503 | Broken specified constraint. The constraint will probably have an entirely unrecognisable name, such as DB2ADMIN.VISIT.CC1253444571125. I got this error when I had a foreign key, and tried to insert a row with a value that wasn’t in the foreign table. |