Informix Error -338
-338 Cannot drop audit trail.
An unexpected error occurred during the execution of a DROP AUDIT statement. Check the accompanying ISAM error code for more detailed information.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-338 is an unexpected error during execution of a DROP AUDIT statement — the official guidance
points to the accompanying ISAM error code as the real diagnostic path, rather than describing a
single specific root cause.
- Filesystem or disk-level problems affecting the audit-trail file's location, preventing a clean removal.
- A permissions issue preventing the server process from removing the audit-trail file.
- The audit-trail file was already removed or moved externally, outside of Informix's own audit-configuration tooling, leaving the server's internal state inconsistent with what's actually on disk.
- A locked or in-use file handle on the audit-trail file at the moment
DROP AUDITruns.
Solutions / Resolution
- Check the accompanying ISAM error code first, per the official guidance, for the specific underlying condition.
- Check filesystem permissions and disk status at the audit-trail file's location.
- Confirm the audit-trail file wasn't manually moved or deleted outside of Informix's own tooling — if it was, the server's internal bookkeeping may be out of sync with reality.
- Check for any process holding the audit-trail file open at the time of the
DROP AUDITattempt.
Examples
Checking the audit-trail file's actual state before retrying
ls -la /informix/audit/audit_trail_1
-- confirm the file exists as Informix expects, with expected
-- permissions, before retrying DROP AUDIT
Diagnostic Checks
- Read the accompanying ISAM error code for the specific underlying reason.
- Check the audit-trail file's actual presence, permissions, and lock status on disk.
- Review the online log for related messages around the same timestamp.
Related Errors / Related Topics
- -333 — "The audit trail file already exists with a different name." A related audit-trail lifecycle error, on the creation side.
- -334 — "Cannot create audit trail." Another infrastructure-level audit-trail failure, on the creation side rather than the drop side.
This is an unexpected, infrastructure-level failure — the ISAM error code is the primary
diagnostic signal, not the DROP AUDIT statement's own syntax or logic.