Informix Error -24101: Cannot specify lock mode for an index on a temporary table.
Cause and resolution
Cannot specify lock mode for an index on a temporary table.
The temporary tables are session specific, which implies that there will not be any locking contention between different users. For this reason, altering the lock mode of an index on such tables is not deemed necessary.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-24101 fires when a statement tries to alter the lock mode of an index on a temporary table — per the official guidance, temporary tables are session-specific, so there's no locking contention between users, making a lock-mode change unnecessary.
- An attempt to alter lock mode on an index belonging to a temporary table, per the official guidance — the direct, only cause.
Solutions / Resolution
- Don't alter the lock mode of an index on a temporary table, per the official guidance — it's not needed since temporary tables are session-specific.
Examples
N/A
No specific triggering statement is documented beyond an index lock-mode change targeting a temporary table.
Diagnostic Checks
- Check whether the target table is temporary, and remove the lock-mode alteration if so.
Related Errors / Related Topics
- -24100 — "Cannot alter index lock mode." The general index-lock-mode-alteration failure, of which this is the temporary-table-specific case.
An index lock-mode alteration targeted a temporary table, where it isn't needed — remove the alteration.