Informix Error -26020: Truncating a table with delete trigger requires ALTER privilege.
Cause and resolution
Truncating a table with delete trigger requires ALTER privilege.
You cannot truncate a table that has delete triggers unless you have ALTER privilege. A user with DELETE privilege can truncate such a table only if there are no delete triggers active.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26020 fires when TRUNCATE TABLE is attempted on a table with active delete triggers by a
user who only holds DELETE privilege — per the official guidance.
- The table has delete triggers, and the executing user has only
DELETEprivilege, notALTER, per the official guidance — the direct, only cause; a user withDELETEprivilege can only truncate such a table if no delete triggers are active.
Solutions / Resolution
- Grant the user
ALTERprivilege on the table, per the official guidance, or - Disable the table's delete triggers first, per the official guidance's implication,
if truncating with only
DELETEprivilege.
Examples
N/A
No specific triggering statement is documented beyond truncating a trigger-bearing table
without ALTER privilege.
Diagnostic Checks
- Check the table for active delete triggers, and confirm the executing user holds
ALTERprivilege (or that no delete triggers are active) before truncating.
Related Errors / Related Topics
- -26018 — "Table %s has a referential key constraint and is not empty." A related
TRUNCATE TABLErestriction, on referential integrity rather than triggers/privilege. - -26021 — "No operations allowed after truncate or online alter fragment in a
transaction." A related
TRUNCATE TABLErestriction, on subsequent transaction operations rather than triggers/privilege.
TRUNCATE TABLE was attempted on a trigger-bearing table without ALTER privilege — grant
ALTER, or disable the delete triggers first.