Informix Error -397
-397 System catalog <table-name> corrupted. </table-name>
This internal error should not occur. The database server has encountered something in one or more of the system catalog tables that violates integrity constraints.
Run the oncheck utility if you are using IBM Informix Dynamic Server. Run bcheck or secheck if you are using the IBM Informix SE database server. If the error recurs, note all circumstances and contact IBM Informix Technical Support.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-397 is a serious internal-integrity error: the server found something in a system catalog table that violates its own internal integrity constraints — genuine catalog corruption, not an ordinary application-level mistake.
- Disk-level corruption affecting the chunk/dbspace holding the system catalog.
- An unclean server shutdown or crash during a catalog-modifying operation, leaving the catalog in an inconsistent state.
- Hardware failure affecting the underlying storage.
- A rare internal server bug, though genuine catalog corruption from I/O/hardware issues is the more common real-world cause.
Solutions / Resolution
- Run the appropriate diagnostic utility for the server edition, per the official guidance:
oncheckfor IBM Informix Dynamic Server, orbcheck/secheckfor IBM Informix SE. - Review the diagnostic utility's output for the specific nature and extent of the corruption.
- If the error persists after diagnosis, contact IBM Informix Technical Support with full documentation of the circumstances, per the official guidance — this is not something to attempt to fix ad hoc at the SQL level.
- Have a recent, verified backup ready before attempting any repair operations, given the severity of catalog-level corruption.
Examples
Running oncheck to diagnose (Dynamic Server)
oncheck -cc <database_name>
-- checks system catalog tables for consistency; review the
-- output carefully before taking further action
Running bcheck/secheck (Informix SE)
bcheck <database_name>
secheck <database_name>
Diagnostic Checks
- Run
oncheck/bcheck/secheckas appropriate for the server edition. - Check for a recent unclean shutdown or crash around the time the corruption was first noticed.
- Check underlying disk/hardware health for the affected chunk/dbspace.
Related Errors / Related Topics
- -311 — "Cannot open system catalog table-name." A related but less severe system-catalog access failure — often a precursor infrastructure issue rather than confirmed corruption.
- -312 — "Cannot update system catalog table-name." Another related system-catalog access failure, at the write level.
This is genuine catalog corruption, not a query mistake — run the appropriate diagnostic utility first and have a verified backup ready before attempting any repair.