Informix Error -23854: Indexes and constraints are not allowed on tables if type is raw or scratch.
Cause and resolution
Indexes and constraints are not allowed on tables if type is raw or scratch.
This error could occur if you try to alter a STANDARD table to RAW or SCRATCH but the table has indexes or referential constraints. The CREATE TABLE statement contains indexes or constraints that are not allowed for RAW or SCRATCH tables. Check your statement to make sure you do not define these kinds of constraints or indexes on RAW or SCRATCH tables.
You must alter the RAW or SCRATCH table to a STANDARD table if you want to use indexes and referential constraints.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-23854 fires when a RAW/SCRATCH table (or a STANDARD table being altered to
RAW/SCRATCH) has indexes or referential constraints — per the official guidance.
- Indexes or referential constraints defined on a
RAW/SCRATCHtable, per the official guidance — the direct, only cause.
Solutions / Resolution
- Don't define indexes/constraints on
RAW/SCRATCHtables, per the official guidance. - Alter the table to
STANDARDfirst if you need indexes/referential constraints, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond indexes/constraints on a
RAW/SCRATCH table.
Diagnostic Checks
- Check the table for defined indexes/referential constraints, and drop them or
alter the table to
STANDARDfirst.
Related Errors / Related Topics
- -23853 — "Unable to change the type of table tablename." A related table-type- alteration error, on the alter failing generally rather than this specific indexes/constraints restriction.
Indexes/constraints aren't allowed on RAW/SCRATCH tables — drop them or alter the
table to STANDARD first.