RE: Audit Purge Script

From: Michael Dinh <mdinh_at_XIFIN.Com>
Date: Fri, 30 Mar 2012 11:29:25 -0700
Message-ID: <>

This is what I have in place for for AUDIT purging.


    audit_trail_type           => DBMS_AUDIT_MGMT.AUDIT_TRAIL_ALL,
    audit_trail_purge_interval => 24,
    audit_trail_purge_name     => 'PURGE_ALL_AUDIT_TRAILS',
    use_last_arch_timestamp => TRUE); END;

  DBMS_SCHEDULER.create_job (

    job_name        => 'SET_LAST_ARCHIVE_TIMESTAMP',
    job_type        => 'PLSQL_BLOCK',
    job_action      => 'BEGIN DBMS_AUDIT_MGMT.SET_LAST_ARCHIVE_TIMESTAMP(audit_trail_type=>DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD,last_archive_time=>SYSTIMESTAMP-90); END;',
    start_date      => SYSTIMESTAMP,
    repeat_interval => 'FREQ=DAILY; INTERVAL=1;',
    end_date        => NULL,
    enabled         => TRUE,
    comments        => 'SET_LAST_ARCHIVE_TIMESTAMP');

Michael Dinh
Disparity Breaks Automation (DBA)

Confidence comes not from always being right but from not fearing to be wrong - Peter T Mcintyre Great minds discuss ideas; average minds discuss events; small minds discuss people - Eleanor Roosevelt  When any rule or formula becomes a substitute for thought rather than an aid to thinking, it is dangerous and should be discarded -Thomas William Phelps  
-----Original Message-----
From: [] On Behalf Of Sent: Friday, March 30, 2012 10:32 AM
To:; Cc:
Subject: RE: Audit Purge Script

The problem I had to wrestle with when considering dbms_audit_mgmt was that the audit table needs to be moved to an entirely new tablespace... which I believe comes with upgrade details.

I kathryn's script works and does the job just as good, it certainly is easier. All the code in this doc ID seems to be an awful lot when compared scheduling this simple script.

Joel Patterson
Database Administrator
904 727-2546

-----Original Message-----
From: [] On Behalf Of Martin Berger Sent: Friday, March 30, 2012 3:13 AM
Cc: oracle-l
Subject: Re: Audit Purge Script

maybe you want to read
SCRIPT: Basic example to manage AUD$ table in 11.2 with dbms_audit_mgmt [ID 1362997.1]
in MetaLink.


On Thu, Mar 29, 2012 at 22:45, Nagaraj S <> wrote:
> Kindly give me steps that need to schedule Audit Purge Job for purging the
> table SYS.AUD$ records more than 90 days



Received on Fri Mar 30 2012 - 13:29:25 CDT

Original text of this message