TRUNCATE AUDIT LOGS

Purpose

Use this statement to clear the data of the system tables EXA_DBA_AUDIT_SESSIONS, EXA_DBA_AUDIT_SQL, EXA_USER_TRANSACTION​_CONFLICTS_LAST_DAY, and EXA_DBA_TRANSACTION​_CONFLICTS. This can be necessary if the gathered data volume is too big.

Prerequisite

The user should have the DBA role.

Syntax

truncate_audit_logs::=

Truncate audit logs statement

Usage Notes

You can keep the recent data by using the KEEP option. The semantic for KEEP LAST DAY/MONTH/YEAR is to subtract one day/month/year from the current system timestamp. For instance, KEEP LAST MONTH will delete all logs before ADD_MONTHS(SYSTIMESTAMP, -1).

Examples

TRUNCATE AUDIT LOGS;
TRUNCATE AUDIT LOGS KEEP LAST MONTH;
TRUNCATE AUDIT LOGS KEEP FROM '2019-01-01';