Informix Error -682: Error reading constraint index on table table-name.
Cause and resolution
Error reading constraint index on table table-name.
The system was unable to validate the constraint. See the ISAM error for more information. If this internal error recurs, note all circumstances and contact IBM Informix Technical Support.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-682 is flagged by the official text as an internal error: the server was unable to validate a constraint because it couldn't read the index implementing it — per the official guidance, the accompanying ISAM error carries the specific reason, and this is part of the same general family of constraint-index-related internal errors as -622.
- An underlying ISAM-level error while reading the constraint's index, per the official guidance's pointer to checking the accompanying ISAM error — the only documented path to the specific cause.
- System-catalog or root dbspace corruption affecting the index, similar to the plausible causes named for -622's related "locating" failure, though -682's own official text doesn't explicitly name this.
Solutions / Resolution
- Check the accompanying ISAM error code, per the official guidance — the only documented path to the specific underlying cause.
- Have the database server administrator check for system-catalog or root dbspace
corruption, using the same diagnostic path as -620/-622 (
oncheck/onutil/tbcheck), given the similarity to those related errors. - If this recurs, note all circumstances and contact IBM Informix Technical Support, per the official guidance.
Examples
Checking for catalog/root dbspace corruption
$ oncheck -cc
-- or the platform-appropriate equivalent, given the constraint-index read failure
Diagnostic Checks
- Check the accompanying ISAM error code first, per the official guidance.
- Run a catalog/root dbspace consistency check, given the similarity to -622's framing.
Related Errors / Related Topics
- -679 — "Cannot read constraint violation data for constraint constraint-name." A related internal constraint-error, about violation diagnostic data rather than the index itself.
- -680 — "Cannot write constraint violation data for constraint constraint-name." Same family, write-side.
- -622 — "Error on locating constraint index index-name." A closely related internal error — also about a constraint's index being unreadable/unlocatable, in the specific context of a uniqueness check during row insert/update rather than general constraint validation.
Closely related to -622 — same diagnostic path (accompanying ISAM error, then a catalog/root dbspace consistency check).