Saturday, January 22, 2011

Structure - Triggers

List triggers by schema

set lines 100 pages 999
select trigger_name
, trigger_type
, table_name
, status
from dba_triggers
where owner = '&owner'
order by status, table_name
/

Display all triggers on the specified table

set lines 100 pages 999
select trigger_name
, trigger_type
, status
from dba_triggers
where owner = '&owner'
and table_name = '&table'
order by status, trigger_name
/

Enable/Disable a trigger

alter trigger <trigger_name> enable
/
or...
alter trigger <trigger_name> disable
/

No comments:

Post a Comment