Skip to content
Home » Oracle » How to Speed Up CLEAN_AUDIT_TRAIL

How to Speed Up CLEAN_AUDIT_TRAIL

CLEAN_AUDIT_TRAIL Runs Slowly ?

If you have never purged the unified audit trails in your database, the first time deletion by CLEAN_AUDIT_TRAIL may take a significant time to complete.

This is because there's no index on column AUD$UNIFIED.EVENT_TIMESTAMP to support the deletion, if you can wait, just be patient.

Solution

You may consider to add an index to support the deletion before you do it again. For example:

SQL> create index audsys.aud$unified_idx1 on audsys.aud$unified (dbid, event_timestamp) tablespace sysaux;

Index created.

Then run DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRAIL to purge audit trails again.

Leave a Reply

Your email address will not be published. Required fields are marked *