Informix Error -25842: An online alter fragment operation cannot be performed in a transaction that has modified objects in a database.
Cause and resolution
An online alter fragment operation cannot be performed in a transaction that has modified objects in a database.
The online alter fragment operation must be the first operation in the transaction that does any kind of modification.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-25842 fires when ALTER FRAGMENT ... ONLINE is issued in a transaction that has already
modified database objects — per the official guidance, the online operation must be the
transaction's first modifying statement.
ALTER FRAGMENT ... ONLINEissued after other modifications in the same transaction, per the official guidance — the direct, only cause.
Solutions / Resolution
- Issue the online alter fragment operation as the first modifying statement in the transaction, per the official guidance, or run it in a fresh transaction.
Examples
N/A
No specific triggering statement is documented beyond an online alter following other modifications.
Diagnostic Checks
- Check whether the current transaction already modified database objects, and restart the transaction if the online alter needs to be first.
Related Errors / Related Topics
- -25843 — "An online alter fragment operation cannot be performed in a transaction that has explicitly locked the table that is being altered." A related online-alter transaction restriction, on explicit locking rather than prior modifications.
ALTER FRAGMENT ... ONLINE wasn't the transaction's first modifying statement — issue it
first, or start a new transaction.