Informix Error -25843: An online alter fragment operation cannot be performed in a transaction that has explicitly locked the table that is being altered.
Cause and resolution
An online alter fragment operation cannot be performed in a transaction that has explicitly locked the table that is being altered.
A LOCK TABLE statement was issued in the current transaction to lock the table that is being altered. An online alter fragment operation cannot be performed in a transaction that has explicitly locked the table. If you need to lock the table, perform the alter fragment operation offline.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-25843 fires when ALTER FRAGMENT ... ONLINE runs in a transaction that already issued
LOCK TABLE on the target table — per the official guidance.
LOCK TABLEalready issued on the target table in the current transaction, per the official guidance — the direct, only cause.
Solutions / Resolution
- Perform the alter fragment operation offline instead, per the official guidance, if the table needs to be explicitly locked.
Examples
N/A
No specific triggering statement is documented beyond an explicit LOCK TABLE preceding
the online alter.
Diagnostic Checks
- Check whether
LOCK TABLEwas issued on the target table this transaction, and run the alter fragment offline if so.
Related Errors / Related Topics
- -25842 — "An online alter fragment operation cannot be performed in a transaction that has modified objects in a database." A related online-alter transaction restriction, on prior modifications rather than an explicit table lock.
ALTER FRAGMENT ... ONLINE ran in a transaction that already LOCK TABLEd the target —
perform the alter offline instead.