Re: Audit Purge Script

From: Nagaraj S <nagaraj.chk_at_gmail.com>
Date: Fri, 30 Mar 2012 03:35:09 +0530
Message-ID: <CAG6s0C1rtJM0xduoZonYujpXK9TPL_9U9zwMPP9vP4-7fwh=Kw_at_mail.gmail.com>



no luck
SQL> create or replace procedure purge_audit_trail ('91') as   2 purge_date date;
  3 begin
  4 purge_date := trunc(sysdate-91);
  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 error
Errors for PROCEDURE PURGE_AUDIT_TRAIL:

LINE/COL ERROR

-------- -----------------------------------------------------------------
1/30     PLS-00103: Encountered the symbol "91" when expecting one of the
         following:
         <an identifier> <a double-quoted delimited-identifier>
         current delete exists prior


On Fri, Mar 30, 2012 at 3:32 AM, kathryn axelrod <kat.axe_at_gmail.com> wrote:

> Try creating the procedure exactly as listed in the post. In the setup
> of the procedure, keep 'days in number'*. Then, when scheduling or
> manually running the procedure, replace that variable with the desired
> value (e.g. 90).
>
> *assuming you're using the script from
>
> http://www.pythian.com/news/1106/oracle-11g-audit-enabled-by-default-but-what-about-purging/
>
> > On Thu, Mar 29, 2012 at 2:10 PM, Nagaraj S <nagaraj.chk_at_gmail.com>
> wrote:
> >> I found a script from google but it's giving error
> >> SQL> create or replace procedure purge_audit_trail ('90') as
> ...
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Mar 29 2012 - 17:05:09 CDT

Original text of this message