TRUNCATE AUDIT LOGS

Purpose

Use this statement to clear the data of the following system tables:

This operation can be necessary if the gathered log data volume has grown very large.

Prerequisite

The user must 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';
TRUNCATE AUDIT LOGS KEEP FROM (current_date - 366);