Informix Error -898
-898 Cannot alter a table which has associated violations/diagnostics tables.
The user has tried to add, drop, or modify a column in a table that has a violations and diagnostics table associated with it.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-898 is the mirror image of -897: it fires when ALTER TABLE (adding, dropping, or
modifying a column) targets a table that currently has a violations and diagnostics table
associated with it — per the official guidance, the target table's structure can't be changed
while that association is active.
ALTER TABLE(add/drop/modify column) attempted on a table with an active violations/diagnostics table, per the official guidance — the direct, only cause.
Solutions / Resolution
- Stop the violations table first, per -896's discussion:
STOP VIOLATIONS TABLE FOR orders; - Perform the intended
ALTER TABLE, once the association is stopped:ALTER TABLE orders ADD ship_date DATE; - Restart the violations table afterward, if still needed:
START VIOLATIONS TABLE FOR orders;
Examples
Stop, alter, restart
STOP VIOLATIONS TABLE FOR orders;
ALTER TABLE orders ADD ship_date DATE;
START VIOLATIONS TABLE FOR orders;
Diagnostic Checks
- Confirm whether the table being altered has an active violations/diagnostics table association, and stop it first if so.
Related Errors / Related Topics
- -897 — "Cannot modify/drop a violations/diagnostics table." The mirror-image restriction: altering the violations/diagnostics table itself, rather than the target table.
- -895 — "Cannot create violations/diagnostics table." A related error, about failing to create the association in the first place.
Stop the violations table association first, perform the ALTER TABLE, then restart it if
still needed.