Informix Error -782
-782 Attached table is fragmented.
When you attach tables, the consumed table cannot be fragmented.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-782 fires when ALTER FRAGMENT ... ATTACH names a table that's itself fragmented — per the
official guidance, an attached (consumed) table must be unfragmented; the table being attached
becomes a single fragment of the target table, so it can't already be internally fragmented
itself.
ATTACHnaming a table that has its own fragmentation scheme, per the official guidance — the direct, only cause.- A table generated by a process that fragments every table uniformly, later attempted as an
ATTACHsource without realizing its fragmentation disqualifies it.
Solutions / Resolution
- Un-fragment the table before attaching it, if it currently has its own fragmentation
scheme — this typically means re-creating it without fragmentation, then reloading its data:
SELECT * FROM fragmented_source INTO TEMP unfragmented_copy; DROP TABLE fragmented_source; CREATE TABLE fragmented_source AS SELECT * FROM unfragmented_copy; -- (or an equivalent unload/reload without a FRAGMENT BY clause) ALTER FRAGMENT ON TABLE orders ATTACH fragmented_source; - Confirm the table's fragmentation status before attempting to attach it:
SELECT partn FROM sysfragments WHERE tabid = (SELECT tabid FROM systables WHERE tabname = 'source_table') AND fragtype = 'T'; -- any rows returned mean the table is fragmented and can't be attached as-is
Examples
The disallowed attempt
-- orders_2025 has its own fragmentation scheme
ALTER FRAGMENT ON TABLE orders ATTACH orders_2025;
-- -782: orders_2025 is itself fragmented
Diagnostic Checks
- Check the table's fragmentation status before attempting to attach it as a new fragment of another table.
Related Errors / Related Topics
- -779 — "Duplicate table name in the alter fragment specification." A related
ATTACHrestriction, about the attach list containing a duplicate rather than the attached table's own structure.
The table being attached must not have its own fragmentation scheme — un-fragment it (via unload/reload) before attaching.