Informix Error -336
-336 Cannot create or drop audit on a temporary table table-name.
Temporary tables cannot be audited. The commands regarding audit trails will not accept the names of temporary tables. If you did not intend to name a temporary table, check the spelling of the table table-name. See the discussion of error -313 for a way to display the names of all permanent tables in the database.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-336 is the auditing-specific sibling of -323: temporary tables can't participate in audit
trail operations at all, for the same underlying reason they can't hold GRANT privileges —
they're session-private and aren't recorded in the persistent system catalogs the way permanent
tables are.
- An audit command referencing a table created with
CREATE TEMP TABLE(orSELECT ... INTO TEMP) — the direct, only cause. - A misspelled table name that happens to resolve to a temp table instead of the intended permanent table.
- Auditing logic written generically for "all tables in this workflow", without excluding temp tables used as scratch space along the way.
Solutions / Resolution
- Don't attempt to create or drop an audit trail on a temporary table, per the official guidance — it's structurally not supported.
- If a permanent table was intended, verify the table name's spelling and confirm it isn't accidentally resolving to a same-named temp table.
- Review
systablesfor permanent tables (tabtype = 'T') to confirm the intended target's actual name:SELECT tabname FROM systables WHERE tabtype = 'T' AND tabname = 'orders'; - Exclude temporary tables from any generic auditing setup logic that iterates over tables used in a workflow.
Examples
Confirming the target is a permanent table
SELECT tabname, tabtype FROM systables WHERE tabname = 'orders_staging';
-- tabtype other than 'T' means this isn't a permanent table;
-- audit operations won't work against it
Excluding temp tables from generic audit setup
-- When iterating over tables to configure auditing, filter to
-- permanent tables only:
SELECT tabname FROM systables WHERE tabtype = 'T';
Diagnostic Checks
- Confirm the target table is permanent, not temporary, via
systables.tabtype. - Double-check the table name's spelling if a permanent table was genuinely intended.
Related Errors / Related Topics
- -323 — "Cannot grant permission on temporary table." The closest sibling — the same
underlying restriction (temp tables aren't in the persistent catalog) applied to
GRANTinstead of auditing. - -335 — "There is no audit trail for the specified table." A related audit-trail error, in this case about a permanent table simply lacking one rather than being structurally ineligible.
Temporary tables are structurally ineligible for audit trail operations, just as they are for
GRANT — this isn't a permission gap that can be closed, only a table-choice mistake to fix.