// oracle · security & access

audit_trail

Where classic auditing writes its records: the database, operating system files, XML files, or nowhere.

Par défaut
DB
Range
NONE, DB, DB,EXTENDED, OS, XML, XML,EXTENDED
Restart needed
Oui
Default checked on
Oracle AI Database 26ai / 23ai

Ce que cela fait

DB stores rows in SYS.AUD$ and OS or XML write files under audit_file_dest, with the EXTENDED variants also capturing SQL text and bind values. From 23ai onward, unified auditing replaced traditional auditing entirely, so the value is kept for compatibility and no longer controls where records go.

Valeur par défaut

DB. DB (Oracle 23ai/26ai); on 23ai and later the value is ignored because unified auditing is always on.

Check the current value

SHOW PARAMETER audit_trail

SELECT name, value, isdefault, issys_modifiable, isses_modifiable, ispdb_modifiable
FROM v$parameter
WHERE name = 'audit_trail';

-- What the SPFILE holds, which is what applies at the next startup:
SELECT value FROM v$sppparameter WHERE name = 'audit_trail';

Change it

ALTER SYSTEM SET audit_trail = DB SCOPE=SPFILE;
-- then SHUTDOWN IMMEDIATE and STARTUP

Restart required: the parameter is static (ISSYS_MODIFIABLE = FALSE), so only SCOPE=SPFILE is accepted and the value applies at the next startup. It is instance-wide: set it from CDB$ROOT, because a PDB gets ORA-65040.

When to change it

Only on releases older than 23ai: DB for centralized SYS.AUD$ records, OS or XML when rules require the trail outside the database. On 23ai and later, configure unified audit policies instead.

What can go wrong

DB,EXTENDED records bind values, so passwords typed into statements land in the audit trail, and SYS.AUD$ grows inside the SYSTEM tablespace until someone manages it.

Questions about audit_trail

What is the default value of audit_trail in Oracle?

DB. DB (Oracle 23ai/26ai); on 23ai and later the value is ignored because unified auditing is always on.

Does changing audit_trail require a restart?

Yes. Restart required: the parameter is static (ISSYS_MODIFIABLE = FALSE), so only SCOPE=SPFILE is accepted and the value applies at the next startup. It is instance-wide: set it from CDB$ROOT, because a PDB gets ORA-65040.

When should I change audit_trail?

Only on releases older than 23ai: DB for centralized SYS.AUD$ records, OS or XML when rules require the trail outside the database. On 23ai and later, configure unified audit policies instead.

Back to all Oracle settings, or check the Oracle manual for every option.

// one client for every engine

Check audit_trail on your own server

SQLly runs the query above against Oracle and the other engines in this reference, from one desktop app on macOS, Windows and Linux.

Texte et données de cette page : CC BY 4.0, en citant SQLly (sqlly.app). Code et extraits SQL : MIT. Détails de la licence