Informix Error -863
-863 Cannot detach a table with rowids.
You must first drop rowids before you use ALTER FRAGMENT... DETACH. See the syntax and usage in the IBM Informix Guide to SQL: Syntax.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-863 fires when ALTER FRAGMENT ... DETACH is attempted on a table that still has ROWID —
per the official guidance, ROWID must be dropped first.
ALTER FRAGMENT ... DETACHattempted while the table still has a ROWID column, per the official guidance — the direct, only cause.
Solutions / Resolution
- Drop ROWID first, per the official guidance, then perform the detach —
DETACHrequires thePARTITIONkeyword unless the fragment identifier is itself the name of the dbspace where the fragment is stored:ALTER TABLE orders DROP ROWIDS; ALTER FRAGMENT ON TABLE orders DETACH PARTITION east_partition orders_east; - Consult the
ALTER FRAGMENT ... DETACHsyntax in the IBM Informix Guide to SQL: Syntax, per the official guidance's own pointer, for the full documented requirements.
Examples
The disallowed attempt
ALTER FRAGMENT ON TABLE orders DETACH PARTITION east_partition orders_east;
-- -863: orders still has a ROWID column
Corrected — drop ROWID first
ALTER TABLE orders DROP ROWIDS;
ALTER FRAGMENT ON TABLE orders DETACH PARTITION east_partition orders_east;
Diagnostic Checks
- Check whether the table has a ROWID column before attempting a detach.
Related Errors / Related Topics
- -855 — "Cannot drop rowids on a non-fragmented table." A related ROWID-management restriction — this detach-prerequisite drop only makes sense on a fragmented table anyway, since -855 blocks it on non-fragmented ones.
- -864 — "Cannot attach a table with rowids." The mirror-image restriction: ROWID must also
be dropped before an
ATTACH, not just aDETACH.
Drop ROWID first (ALTER TABLE ... DROP ROWIDS), then perform the detach.