Informix Error -19813: Cannot add CRCOLS when table already has replication shadow columns.
Cause and resolution
Cannot add CRCOLS when table already has replication shadow columns.
The specified table was created with the WITH CRCOLS syntax and therefore already has the replication shadow columns defined. You cannot alter this table to add CRCOLS to it.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-19813 fires when ALTER TABLE tries to add CRCOLS to a table already created WITH CRCOLS — per the official guidance.
- A table already created
WITH CRCOLSaltered to add CRCOLS again, per the official guidance — the direct, only cause.
Solutions / Resolution
- Skip the
ALTER TABLE ... ADD CRCOLS— the table already has replication shadow columns, per the official guidance.
Examples
Adding CRCOLS to a table that already has them
CREATE TABLE mytab (id INT) WITH CRCOLS;
ALTER TABLE mytab ADD CRCOLS;
-- -19813: mytab already has replication shadow columns
Diagnostic Checks
- Check whether the table was created
WITH CRCOLS, before attempting to add them viaALTER TABLE.
Related Errors / Related Topics
- -19812 — "Illegal usage of replication shadow columns." The general restriction this is a specific case of.
- -19814 — "Cannot drop CRCOLS when table does not have replication shadow columns." The mirror-image error, about dropping nonexistent CRCOLS rather than adding existing ones.
The table already has replication shadow columns — skip the ADD CRCOLS alteration.