# audit_trail

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

Source: https://sqlly.app/sql-configuration/oracle/audit-trail
Last updated: 2026-11-30
License: Text and data [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (credit SQLly, sqlly.app); code and SQL snippets [MIT](https://opensource.org/license/mit). [Details](https://sqlly.app/license).

**Default**

`DB`

**Range**

NONE, DB, DB,EXTENDED, OS, XML, XML,EXTENDED

**Restart needed**

Yes

**Default checked on**

Oracle AI Database 26ai / 23ai

## What it does

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.

## Default value

`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](https://sqlly.app/sql-configuration/oracle), or check the [Oracle manual](https://docs.oracle.com/en/database/oracle/oracle-database/23/refrn/initialization-parameters.html) for every option.

## Related Oracle settings

- [`remote_login_passwordfile` Whether the password file authenticates remote administrative logins such as SYSDBA and SYSOPER.](https://sqlly.app/sql-configuration/oracle/remote-login-passwordfile)
