Informix Error -893
-893 Cannot activate/create object object-name because of its dependencies.
The user has issued a SET statement to set a database object to the enabled or filtering object mode, or the user has issued a CREATE INDEX, CREATE TRIGGER, or CREATE TABLE statement to create a database object in the enabled or filtering object mode. However, this object needs other disabled objects. For example, before enabling a referential constraint on a table, the user must first enable the indexes that the constraint needs.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-893 is the mirror image of -892: it fires when a SET statement (or a CREATE INDEX/CREATE TRIGGER/CREATE TABLE specifying enabled or filtering mode directly) tries to
activate an object whose own dependencies are still disabled — per the official guidance's
example, a referential constraint can't be enabled before the indexes it needs are themselves
enabled.
- Enabling a referential constraint before the index(es) it depends on are enabled, per the official guidance's own example — the direct, common case.
- Creating an object in enabled/filtering mode that depends on another object still
disabled, per the official guidance's broader framing — the same underlying dependency-order
requirement, hit at create time rather than via a later
SET.
Solutions / Resolution
- Enable the dependency objects first, working from the innermost dependency outward —
the opposite order from -892's disable sequence:
SET INDEXES FOR orders ENABLED; SET CONSTRAINTS fk_order_items_orders ENABLED; - Identify the full dependency chain before starting, via
sysconstraints/sysindexes, to enable objects in the correct order the first time.
Examples
Enabling an index before the constraint that depends on it
SET INDEXES FOR orders ENABLED;
SET CONSTRAINTS fk_order_items_orders ENABLED;
Diagnostic Checks
- Identify which object is being activated, and trace its dependency chain (indexes it needs, and any objects those in turn depend on) to enable them in the correct order.
Related Errors / Related Topics
- -892 — "Cannot disable object object-name due to other active objects using it." The mirror-image restriction, on disabling in the wrong order rather than enabling.
- -891 — "Temporary table objects can only be enabled." A related object-mode restriction, specific to temp tables.
The mirror image of -892 — enable dependency objects first, working innermost-out, before enabling the object actually targeted.