Informix Error -896
-896 Violations table is not started for the target table.
This error occurs in either of the following cases:
1. A STOP VIOLATIONS TABLE was executed before the START VIOLATIONS TABLE statement or after the START VIOLATIONS TABLE statement was rolled back.
2. A violations table has not been started for the target table and an INSERT, DELETE, or UPDATE statement fails to satisfy any filtering-mode object on the target table.
A violations table must exist before execution of the STOP VIOLATIONS statement.
To prevent this error, you can start a violations table for the target table.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-896 fires in two related situations, per the official guidance: STOP VIOLATIONS TABLE
executed without (or after a rolled-back) START VIOLATIONS TABLE, or an INSERT/DELETE/
UPDATE failing to satisfy a filtering-mode object on a target table that never had a violations
table started.
STOP VIOLATIONS TABLEexecuted beforeSTART VIOLATIONS TABLE, per the official guidance, or after theSTARTwas rolled back — no violations table is actually active to stop.- A filtering-mode object (a constraint set to
FILTERING) violated by anINSERT/DELETE/UPDATE, with no violations table started for the target table, per the official guidance — filtering mode specifically needs a violations table to record the violation into.
Solutions / Resolution
- Start a violations table for the target table, per the official guidance, before
attempting operations that depend on one:
START VIOLATIONS TABLE FOR orders; - Confirm the
START VIOLATIONS TABLEtransaction wasn't rolled back, per the official guidance, if aSTOPis failing unexpectedly — a violations table must exist (and its starting transaction must have committed) beforeSTOP VIOLATIONS TABLEcan run. - Check whether any constraint on the target table is in
FILTERINGmode, per the official guidance, and start a violations table before performing DML that might violate it.
Examples
Starting a violations table before filtering-mode DML
START VIOLATIONS TABLE FOR orders;
-- now INSERT/UPDATE/DELETE against orders, with filtering-mode
-- constraints recording violations into the violations table
Diagnostic Checks
- Confirm whether
START VIOLATIONS TABLEwas ever run for the target table, and whether that transaction actually committed. - Check for filtering-mode constraints on the target table, if the error surfaced during
ordinary DML rather than an explicit
STOP VIOLATIONS TABLE.
Related Errors / Related Topics
- -895 — "Cannot create violations/diagnostics table." A related error, about
START VIOLATIONS TABLEitself failing, rather than one never having been started at all. - -897 — "Cannot modify/drop a violations/diagnostics table." A related restriction, about altering an existing violations table.
Start a violations table for the target table before relying on filtering-mode behavior or
attempting STOP VIOLATIONS TABLE.