Re: Audit Purge Script
From: Nagaraj S <nagaraj.chk_at_gmail.com>
Date: Fri, 30 Mar 2012 02:40:42 +0530
Message-ID: <CAG6s0C1w32pGu6wJ1sqGEWDjr2dj8q3Z-TYTiz28xg3s5rgGhQ_at_mail.gmail.com>
I found a script from google but it's giving error SQL> create or replace procedure purge_audit_trail ('90') as 2 purge_date date;
3 begin
4 purge_date := trunc(sysdate-days); 5 dbms_system.ksdwrt(2,'AUDIT: Purging Audit Trail until ' ||
9 dbms_system.ksdwrt(2,'AUDIT: Purging Audit Trail until ' ||
12 /
Date: Fri, 30 Mar 2012 02:40:42 +0530
Message-ID: <CAG6s0C1w32pGu6wJ1sqGEWDjr2dj8q3Z-TYTiz28xg3s5rgGhQ_at_mail.gmail.com>
I found a script from google but it's giving error SQL> create or replace procedure purge_audit_trail ('90') as 2 purge_date date;
3 begin
4 purge_date := trunc(sysdate-days); 5 dbms_system.ksdwrt(2,'AUDIT: Purging Audit Trail until ' ||
6 purge_date || ' started');7 delete from aud$ where ntimestamp# < purge_date; 8 commit;
9 dbms_system.ksdwrt(2,'AUDIT: Purging Audit Trail until ' ||
10 purge_date || ' has completed');11 end;
12 /
Warning: Procedure created with compilation errors.
SQL> show errors
Errors for PROCEDURE PURGE_AUDIT_TRAIL:
LINE/COL ERROR
-------- ----------------------------------------------------------------- 1/30 PLS-00103: Encountered the symbol "90" when expecting one of the following: <an identifier> <a double-quoted delimited-identifier> current delete exists prior
please let me know what could be the problem
On Fri, Mar 30, 2012 at 2:15 AM, Nagaraj S <nagaraj.chk_at_gmail.com> wrote:
> Kindly give me steps that need to schedule Audit Purge Job for purging the
> table SYS.AUD$ records more than 90 days
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Mar 29 2012 - 16:10:42 CDT