Informix Error -891
-891 Temporary table objects can only be enabled.
You cannot change the object mode of a temporary table object to the disabled or filtering object mode.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-891 fires when a SET-style statement attempts to change a temporary table's object mode to
disabled or filtering — per the official guidance, temp table objects can only ever be in the
enabled mode.
- A
SETstatement targeting a temp table object's mode as disabled or filtering, per the official guidance — the direct, only cause; the object-mode mechanism (used for constraints/ indexes/triggers on permanent tables) doesn't apply the same way to temp tables.
Solutions / Resolution
- Don't attempt to change a temp table object's mode away from enabled — per the official guidance, this isn't supported under any circumstances.
- If disabled/filtering-mode behavior is genuinely needed, use a permanent table instead, since object-mode management (disable/enable a constraint or index for bulk operations, for instance) is a permanent-table mechanism.
Examples
The disallowed attempt
CREATE TEMP TABLE staging_orders (order_id INT, status CHAR(10));
CREATE INDEX idx_staging_status ON staging_orders (status);
SET INDEXES FOR staging_orders DISABLED;
-- -891: temp table objects can only be enabled
Diagnostic Checks
- Confirm whether the object being mode-changed belongs to a temp table — if so, the mode change isn't supported regardless of the target mode.
Related Errors / Related Topics
- -892 — "Cannot disable object object-name due to other active objects using it." A related object-mode restriction, about dependency ordering, for permanent-table objects.
- -893 — "Cannot activate/create object object-name because of its dependencies." A related object-mode restriction, about enabling an object whose own dependencies aren't yet enabled.
Temp table objects can only be enabled — use a permanent table if disabled/filtering-mode behavior is genuinely needed.