Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: AUDIT based on certain conditions?

Re: AUDIT based on certain conditions?

From: Jared Still <jkstill_at_gmail.com>
Date: Mon, 5 Jun 2006 14:12:11 -0700
Message-ID: <bf46380606051412r4debbccdmd37fd255d3f46b13@mail.gmail.com>


Please take a look at the docs on AUDIT, try it on a test system and view the results.

Then take another look at your trigger, and see if you really want to put that command in a trigger.

My guess is that you don't.

Jared

On 6/5/06, Dhimant Patel <drp4kri_at_gmail.com> wrote:
>
> Hi All,
>
> I have a need to audit use of schemas based on certain users - I can
> differentiate these users based on v$session.terminal or v$session.osuser.
> I am not quite sure had I done this before but I want to setup a AFTER
> LOGON database trigger to turn on/off the auditing based on above v$ values.
>
>
> create or replace trigger on_logon
> after logon on database
> declare
> mTname varchar2(40);
> begin
> SELECT SYS_CONTEXT('USERENV','TERMINAL') INTO mTname FROM DUAL;
> if (SUBSTR(mTname,1,3) <> 'pts')
> then
> EXECUTE IMMEDIATE 'AUDIT UPDATE ANY TABLE BY SESSION';
> end if;
> end;
>
>
>
> I tried with following code but am getting
> ORA-30511 Invalid DDL operation in system trigger.
>
>
> Any ideas ?
>
>
> -Thanks,
> DP.
>

-- 
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jun 05 2006 - 16:12:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US