-- #############################################################################################
--
-- %Purpose: Show Database Triggers for Schema Owner
--
-- #############################################################################################
--
ACCEPT user_namen CHAR PROMPT 'Schema Owner: '
--
set feed off;
set pagesize 10000;
set wrap off;
set linesize 200;
set heading on;
set tab on;
set scan on;
set verify off;
--
spool show_trigger.lst
ttitle off

column trigger_name format a20 heading 'Trigger|Name'
column trigger_type format a20 heading 'Trigger|Typ'
column table_owner format a10 heading 'Table|Owner'
column table_name noprint new_value tab
column table_name format a20 heading 'Table|Name'
column triggering_event format a20 heading 'Event'
column status format A8 heading 'Status'

ttitle left 'Trigger of Tabelle: 'tab skip 2

break on table_name skip page -
on owner skip 2 -
on constraint_name skip -

select  distinct table_owner,
    table_name,
  trigger_name,
  trigger_type,
  triggering_event,
  status
from dba_triggers
 where table_owner LIKE UPPER('&user_namen');
spool off;
