Informix Error -246
-246 Could not do an indexed read to get the next row.
The database server encountered an error when it attempted to look up a row through an index. Check the accompanying ISAM error code for more information. The table file or the index file might have been corrupted. Unless the ISAM error code or an operating-system message points to another cause, run the oncheck utility (secheck with IBM Informix SE or tbcheck with IBM Informix OnLine) to check and repair table and index.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-246 is the "fetch next row" counterpart to -245's initial indexed positioning — the same underlying condition (table or index corruption), encountered one step later in an indexed scan.
- Table file corruption.
- Index file corruption.
- General storage-integrity causes shared with other corruption conditions in this catalogue.
Solutions / Resolution
- Check the accompanying ISAM error code and OS-level messages first.
- Run
oncheck(secheckfor IBM Informix SE,tbcheckfor IBM Informix OnLine) to check and repair the table and index, per the official guidance, unless a more specific cause is already identified.
Examples
Following the official diagnostic order
-- 1. Check the accompanying ISAM error code and OS messages first
-- 2. If nothing specific turns up:
oncheck -cI mydb:customer
Diagnostic Checks
- Check the accompanying ISAM error code and OS-level messages.
- Run
oncheck/secheck/tbcheckif no more specific cause is identified, checking the index specifically.
Related Errors / Related Topics
- -245 — "Could not position within a file via an index." The immediately preceding step in the same indexed-scan sequence — this error is the same condition, encountered while fetching a subsequent row rather than establishing the initial position.
- -105 — "ISAM error: bad ISAM file format." The general corruption sibling.
Same diagnosis and fix as -245 — check the index specifically with oncheck -cI.