Informix Error -978: No insert permission on the violations/diagnostics tables.
Cause and resolution
No insert permission on the violations/diagnostics tables.
The user issued an INSERT, DELETE, or UPDATE statement on a table with filtering-mode objects. The user receives this message because the user lacks the INSERT privilege on the violations or diagnostics tables that are associated with this table. The user must have the INSERT privilege on the violations and diagnostics tables before the database server can write rows into the violations and diagnostics tables for that user.
Similarly, if the user issued a SET statement to change the object mode of a disabled constraint or a disabled unique index to the enabled or filtering mode, and if a violations table has been started for the target table, the user receives this message if the user lacks the INSERT privilege on the violations or diagnostics table associated with the target table.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-978 fires when a user modifies a table that has filtering-mode objects (constraints, unique
indexes, or triggers set to filtering mode) but lacks the INSERT privilege on the violations or
diagnostics tables associated with it — per the official guidance, the server needs to write
rejected rows into those tables, and can't without that privilege.
- An
INSERT,UPDATE, orDELETEstatement on a table with filtering-mode objects, per the official guidance, where the executing user lacksINSERTprivilege on the associated violations or diagnostics table. - A
SETstatement changing a disabled constraint or disabled unique index to enabled or filtering mode, per the official guidance, on a table with a started violations table — the same missing-privilege condition applies to theSETitself.
Solutions / Resolution
- Grant
INSERTprivilege on the violations and diagnostics tables associated with the target table, per the official guidance — this is the documented, direct fix. - Confirm which violations/diagnostics tables are associated with the target table before granting, since each filtering-mode-enabled table has its own pair.
Examples
Granting the needed privilege
GRANT INSERT ON mytable_vio TO some_user;
GRANT INSERT ON mytable_dia TO some_user;
The violations and diagnostics table names are whatever was specified when the violations table
was started (via START VIOLATIONS TABLE) for the target table.
Diagnostic Checks
- Confirm the target table has filtering-mode objects and an associated, started violations table.
- Check the user's current privileges on the associated violations and diagnostics tables specifically — table-level privilege on the base table isn't sufficient.
Related Errors / Related Topics
- -971 — "Integrity violations detected." The condition that actually routes rows into the violations table in the first place; -978 is what happens when the user lacks permission to write to it once that routing needs to happen.
The fix is narrow: grant INSERT on the specific violations and diagnostics tables tied to the
target table, not just on the table itself.