Informix Error -171: ISAM error: ISAM file format change detected.
Cause and resolution
ISAM error: ISAM file format change detected.
A program that uses a particular locking method or index-node size has attempted to access an ISAM file that was created using a different locking method or index-node size.
If you are migrating files from a platform that uses another index-node size, you must run the bcheck or secheck utility with the -s option against all of the ISAM files (.dat and .idx) to resize the index nodes.
For IBM Informix SE, if you are migrating applications between platforms that use different locking methods, you must set the environment variable RESETLOCK to convert ISAM files as you access them. You can access all files for a given database by running UPDATE STATISTICS in that database, if time permits.
For C-ISAM applications, if you are migrating applications between platforms that use different locking methods, you must set the environment variable RESETLOCK to convert C-ISAM files as you access them.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-171 means a program using one locking method or index-node size is trying to access an ISAM file built with different settings — almost always the result of migrating data files between platforms without the corresponding conversion step. Unlike most format-mismatch conditions in this range, this one has a specific, documented, actionable fix rather than pointing at corruption.
- Migrating ISAM data files (
.dat/.idx) between platforms with different index-node sizes — a platform-specific ISAM implementation detail that the file's internal structure encodes, and the new platform's library doesn't automatically reconcile. - Migrating between platforms or configurations with different locking methods, specific to IBM Informix SE or C-ISAM — the file's internal locking-method marker doesn't match what the current environment expects.
- Copying raw
.dat/.idxfiles directly from one system to another during a migration, without running the platform-appropriate conversion step afterward. - Restoring an old backup created on a different platform or version without accounting for these platform-specific format differences.
Solutions / Resolution
The fix depends on which mismatch actually applies:
- For platform migration with different index-node sizes: run
bcheckorsecheckwith the-soption against all ISAM files (.datand.idx) to resize index nodes to match the current platform. - For IBM Informix SE with different locking methods: set the
RESETLOCKenvironment variable to convert ISAM files as they're accessed, or runUPDATE STATISTICSin the database as an alternative that touches (and thereby converts) all files at once. - For C-ISAM applications migrating between platforms with different locking methods: set
RESETLOCKto convert files as they're accessed during the migration. - Plan for this conversion step explicitly as part of any platform migration involving ISAM/C-ISAM data — don't copy raw files and assume they'll work unchanged on the new platform.
- Verify conversion completed for every relevant file, not just the ones an application happens to touch first — otherwise this error can resurface intermittently as different files get accessed for the first time after the migration.
Examples
Resizing index nodes after a platform migration
bcheck -s customer.dat customer.idx
secheck -s orders.dat orders.idx
Run this against every migrated ISAM file, not just the first one that triggers -171.
Converting locking method via RESETLOCK
export RESETLOCK=1
# Access each file (or run a program that touches it) so the
# conversion happens as part of normal access
Converting everything at once via UPDATE STATISTICS
UPDATE STATISTICS;
For Informix SE, this touches every file in the database, converting each as it's accessed — useful as a single step rather than tracking down every individual file.
Diagnostic Checks
- Determine whether this is an index-node-size mismatch or a locking-method mismatch based on the specific platforms and product (Informix SE vs. C-ISAM) involved in the migration.
- Check whether
RESETLOCKis set in the environment, if a locking-method mismatch is suspected. - Review migration history and timeline to correlate the onset of this error with a recent platform change or restore.
Related Errors / Related Topics
- -100 — "ISAM error: duplicate value for a record with unique key." The other foundational ISAM-level error in this family.
- -105 — "ISAM error: bad ISAM file format." A different kind of file-format problem — -105 is genuine corruption requiring repair or restore; -171 is a platform-format mismatch with a specific, documented conversion fix, not corruption at all.
This is a conversion step, not a corruption to repair — identify which specific mismatch applies (index-node size or locking method) and run the matching fix from the official guidance.