Informix Error -631
-631 Cannot create optical cluster on column that is not TEXT or BYTE.
You can only create optical clusters on columns of TEXT or BYTE data type. The column name is some other type. Check that the column is the one you meant to specify, and review the definition of the table.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-631 fires when creating an optical cluster (the Optical Subsystem's mechanism for grouping
simple-large-object data for storage on optical media) names a column that isn't TEXT/BYTE —
per the official guidance, optical clusters can only be created on columns of these two types.
- The optical cluster statement naming a column of a type other than
TEXT/BYTE— the direct, only cause. - A column-naming mistake, per the official guidance's suggested check — confirm the column is actually the one intended, and review the table's definition.
Solutions / Resolution
- Check that the column is the one you meant to specify, per the official guidance.
- Review the table's definition to confirm the intended column's actual declared type:
SELECT colname, coltype FROM syscolumns WHERE tabid = (SELECT tabid FROM systables WHERE tabname = 'documents'); - Only attempt to create the optical cluster on a genuinely
TEXT/BYTEcolumn — there's no supported way to create one on a column of a different type.
Examples
A column-type mismatch
-- doc_id is INT, not TEXT/BYTE
-- an optical cluster statement naming doc_id would fail with -631
Confirming the correct column and its type
SELECT colname, coltype FROM syscolumns
WHERE tabid = (SELECT tabid FROM systables WHERE tabname = 'documents');
Diagnostic Checks
- Query
syscolumnsfor the target column's actual declared type, confirming it'sTEXT/BYTEbefore attempting to create the optical cluster.
Related Errors / Related Topics
- -632 — "Cannot create optical cluster." A related optical-cluster-creation failure, for a different underlying reason once the column type itself is correct.
- -633 — "Cannot drop optical cluster." The corresponding drop-side failure.
A column-type mismatch specific to the Optical Subsystem — confirm the target column is actually
TEXT/BYTE via syscolumns before retrying.