Informix Error -856
-856 Rowids already exist on table.
A rowid column already exists for the specified table. You cannot create a rowid for a table more than once. Change your SQL statement.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-856 fires when an attempt to add a ROWID column to a table targets one that already has one — per the official guidance, a table can't have ROWID created for it more than once.
ALTER TABLE ... ADD ROWIDS(or equivalent) attempted on a table that already has a ROWID column, per the official guidance — the direct, only cause.- A migration/deployment script re-run without checking the table's current ROWID status.
Solutions / Resolution
- Change the SQL statement, per the official guidance — since the table already has ROWID, no action is needed, or the statement should be removed from the script/migration.
- Check the table's current ROWID status before attempting to add one:
SELECT tabname FROM systables WHERE tabname = 'orders'; -- check whether the table currently has a rowid column via the -- appropriate fragmentation/rowid catalog detail for the server version -- in use, or simply query ROWID directly: SELECT ROWID FROM orders WHERE 1 = 0; -- succeeds only if the table currently has a ROWID column
Examples
Checking ROWID status before attempting to add it
SELECT ROWID FROM orders WHERE 1 = 0;
-- if this succeeds, orders already has ROWID -- don't attempt to add it again
Diagnostic Checks
- Confirm whether the table already has a ROWID column before attempting to add one.
Related Errors / Related Topics
- -855 — "Cannot drop rowids on a non-fragmented table." A related ROWID-management restriction, about dropping rather than adding.
- -857 — "Rowids do not exist on table." The mirror-image situation: attempting to drop a ROWID that doesn't currently exist.
The table already has a ROWID column — no action needed, or remove the redundant statement from the script.