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

Home -> Community -> Usenet -> c.d.o.server -> Re: how to checking DDLon triggers

Re: how to checking DDLon triggers

From: Daniel Roy <danielroy10_at_hotmail.com>
Date: 26 Feb 2003 08:59:39 -0800
Message-ID: <1b061893.0302260859.379b750c@posting.google.com>


From Tom Kyte:

create or replace trigger ddl_trigger
after DDL on SCHEMA
begin

    insert into log
    select ora_sysevent,ora_dict_obj_owner,

           ora_dict_obj_name,ora_dict_obj_type,
           to_char(sysdate,'fm dd/Mon/yyyy HH:MI:SS AM'),
           machine,terminal,program,osuser
      from v$session
     where audsid = sys_context( 'userenv', 'sessionid' );

    if ( sql%rowcount <> 1 )
    then

        raise_application_error
        ( -20001, 'Unable to id your session' );
    end if;
end;
/

Daniel Received on Wed Feb 26 2003 - 10:59:39 CST

Original text of this message

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