Informix Error -227: DDL operations on ROWID prohibited.
Cause and resolution
DDL operations on ROWID prohibited.
This statement attempts to change the column named ROWID. That column is a part of every table except a fragmented table. You can select it with a SELECT statement and compare it in a WHERE clause, but you cannot alter it with a DDL statement.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-227 is a clear, well-defined restriction: ROWID — the automatic, system-managed virtual
column present on every non-fragmented table — can be selected and compared in a WHERE clause,
but it can never be altered, renamed, or dropped through DDL.
- Attempting
ALTER TABLEto modify, rename, or drop theROWIDcolumn — not permitted, since it's automatically managed by the engine rather than a genuine user-defined column. - Attempting
CREATE TABLEwith an explicitROWIDcolumn definition that conflicts with the automatic one, or attempting to redefine its type or constraints. - Confusion about
ROWID's nature. Since it can be selected and compared (unlike some of its other restrictions — see -205), it's reasonable, but incorrect, to assume it can also be altered like an ordinary column. - Generic schema-migration tooling iterating over "all columns" and mistakenly attempting to
apply a DDL operation to
ROWIDalong with genuine user-defined columns. - DDL ported from another system with different rules for a similar pseudo-column, not accounting for Informix's specific restriction here.
Solutions / Resolution
- Don't attempt DDL against
ROWID. There's no workaround — it's automatically managed and can't be altered, renamed, or dropped by any DDL statement. - For generic schema-migration tooling, exclude
ROWIDfrom any DDL operation that iterates over "all columns," since it isn't a genuine user-managed column. - Continue using
ROWIDnormally inSELECTandWHEREclauses — only DDL modification is restricted, not read access. - When porting DDL from another system, remove any explicit
ROWIDcolumn handling — Informix manages this automatically and doesn't need, or allow, explicit DDL control over it.
Examples
The disallowed operation
ALTER TABLE customer DROP COLUMN ROWID;
-- -227: ROWID can't be modified via DDL
Correct usage: reading, not altering
SELECT ROWID, name FROM customer WHERE ROWID = 12345;
-- perfectly valid — ROWID can be selected and compared freely
Generic tooling mistakenly targeting ROWID
-- A migration tool iterates over every column reported by the
-- catalog and attempts a type-check ALTER on each
for col in all_columns(table):
alter_column_type(table, col, ...)
-- fails with -227 when it reaches ROWID
Excluding ROWID from the tool's column iteration resolves this.
Diagnostic Checks
- Review the DDL statement to confirm
ROWIDis the column actually being targeted. - Check schema-migration tooling logic for whether it's iterating over "all columns"
including
ROWIDwithout excluding it.
Related Errors / Related Topics
- -205 — "The statement failed because you cannot use ROWID for views with union,
intersect, minus, aggregates, group by, multiple tables, or derived tables." Another
ROWIDrestriction, though about which views support it rather than DDL modification. - -126 — "ISAM error: bad row id." The other
ROWID-related error in this catalogue, concerning stale or corrupted physical references rather than a DDL restriction.
Exclude ROWID from any generic "apply this DDL to every column" logic — it's the one column on
a table that DDL simply can't touch.