Re: audit "alter package compile"

From: Maris Elsins <elmaris_at_gmail.com>
Date: Thu, 6 Mar 2014 00:59:57 +0200
Message-ID: <CABQhObtz+HS84kUx0t1Zj5orsZRwZo-s-iAWVbM4REb0=kDHXQ_at_mail.gmail.com>



Hi,

I don't know if that can be done using the auditing functionality, but as Mark has already mentioned triggers can help. Look at the client event triggers ("BEFORE ALTER" or "AFTER ALTER") here: http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/triggers.htm#g1722272 I've implemented that in one database to control who is altering packages as we had situations when some developer recompiled a package and invalidated thousands of depending code objects.

---
Maris Elsins
_at_MarisElsins <https://twitter.com/MarisElsins>
www.facebook.com/maris.elsins




On Wed, Mar 5, 2014 at 10:59 PM, Mark W. Farnham <mwf_at_rsiz.com> wrote:


> I'm not sure whether there is a way to make audit behave in that way (I'm
> supposing it is documented if there is a way, but I'm not going to search
> for that right now.)
>
>
>
> IF there is no way to have audit track an "alter compile" I would
> understand it in that an argument could be made that is a repair, not a
> change. Or they might view it as a bug. (And I'm making an argument either
> way right now.)
>
>
>
> Supposing there is no documented way to do it and that it is not
> considered a bug or something that should be optioned to work either way
> AND you don't have time to wait for such an implementation in any case,
> THEN perhaps you could put a trigger on one of the columns that gets
> changed when the package is recompiled and write that up so as to log it.
> If you don't want to write to the real audit tables (probably a good idea
> to not directly mess with them, perhaps unlocking them to unwanted access),
> then you might create a different table that you UNION ALL to the real one
> for your audit reports.
>
>
>
> Something like that may be a useful workaround for you if the other things
> are true. I also wouldn't lightly slap a trigger on a system column, but if
> my suppositions are true this may be the best alternative.
>
>
>
> mwf
>
>
>
> *From:* oracle-l-bounce_at_freelists.org [mailto:
> oracle-l-bounce_at_freelists.org] *On Behalf Of *Krishan Gupta
> *Sent:* Wednesday, March 05, 2014 1:22 PM
> *To:* Oracle-L_at_freelists.org
> *Subject:* audit "alter package compile"
>
>
>
> Hello all,
>
>
>
> I am working on oracle 11.1.0.7 Oracle database. Auditing is enabled.
> Whenever I create or drop the package I get respective event logged
> in dba_audit_trail table whereas when I compile the package using alter
> package compile, this is not getting logged in this table. As part of audit
> we need this event logged in. Please help !
>
>
>
> Thanks & Regards
>
> Krishan Gupta
>
-- http://www.freelists.org/webpage/oracle-l
Received on Wed Mar 05 2014 - 23:59:57 CET

Original text of this message