Informix Error -949
-949 Unable to alter fragmentation scheme when indexes disabled.
An attempt has been made to alter the fragmentation scheme on a table that has disabled indexes. This is not allowed. The action is aborted.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-949 fires when ALTER FRAGMENT is attempted on a table that currently has disabled
indexes — per the official guidance, this isn't allowed, and the action is aborted outright.
ALTER FRAGMENTattempted while one or more of the table's indexes are inDISABLEDmode, per the official guidance — the direct, only cause.- An index disabled for a bulk load or maintenance operation, left disabled when a fragmentation change was also attempted during the same maintenance window.
Solutions / Resolution
- Re-enable the table's indexes first, using the same
SET INDEXES FOR tablename ENABLEDmechanism discussed for -892/-893:SET INDEXES FOR orders ENABLED; - Then perform the
ALTER FRAGMENToperation, once indexes are enabled. - Re-disable the indexes afterward, if the original reason for disabling them (a bulk load still in progress, for instance) is still in effect.
Examples
Re-enabling indexes before altering fragmentation
SET INDEXES FOR orders ENABLED;
ALTER FRAGMENT ON TABLE orders ADD new_west_dbspace (region = 'west');
Diagnostic Checks
- Check whether any of the table's indexes are currently disabled before attempting
ALTER FRAGMENT:SELECT idxname FROM sysindexes WHERE tabid = (SELECT tabid FROM systables WHERE tabname = 'orders'); -- cross-reference with sysconstraints/object-mode state for disabled indexes
Related Errors / Related Topics
- -892 — "Cannot disable object object-name due to other active objects using it." A related object-mode restriction, about disable-ordering dependencies.
- -893 — "Cannot activate/create object object-name because of its dependencies." A related object-mode restriction, about enable-ordering dependencies.
Re-enable the table's indexes first (SET INDEXES FOR tablename ENABLED), then perform the
fragmentation change.