We must register if the trigger was disable

Hi all

Will have one of the scenarios,

If the trigger has been disabled, then we need to insert another table through trigger for the details of the audit, if possible.

Please tel me your suggestion...

I thank in advance

If I understand, you want to detect when a person turns off a trigger?  What if a person disabled, for example by causing an error in an addiction? It is difficult to trigger detection.

Anyway if the first case, you could add a DDL on "AFTER ALTER" trigger on the schema or DB you want to monitor.  I wouldn't not recommend myself well.  But something like...

create or replace trigger AASCH_TRIGGER after alter on schema

declare

vOwner varchar2 (30);

VNAME varchar2 (30);

vType varchar2 (30);

vStatus varchar2 (50);

Start

Select ora_dict_obj_owner, ora_dict_obj_name, ora_dict_obj_type

in vOwner, vname, vType

Double;

If ora_dict_obj_type = "TRIGGER" then

Select the STATE

in vStatus

from user_triggers

where trigger_name = VNAME;

If vStatus <> 'ACTIVE' then

-Do something, e-mail or other

end if;

end if;

end;

/

Tags: Database

Similar Questions

Maybe you are looking for