set lines 120 pages 2000
accept pvm prompt “Enter The String You Want to Search -> ”
select distinct owner, name, type from dba_source where
instr(upper(text), upper(‘&pvm’)) != 0 ;
set serveroutput on
DECLARE
CURSOR cur_triggers IS
SELECT owner, trigger_name, table_name, trigger_body
FROM dba_triggers;
v_position INTEGER;
BEGIN
DBMS_OUTPUT.ENABLE(NULL);
DBMS_OUTPUT.PUT_LINE(‘OWNER TABLE NAME TRIGGER NAME ‘);
DBMS_OUTPUT.PUT_LINE(‘===================================================================================================’)
;
FOR pvm1 IN cur_triggers LOOP
v_position := INSTR(upper(pvm1.trigger_body), upper(‘&pvm’));
IF v_position > 0 THEN
DBMS_OUTPUT.PUT_LINE(rpad(pvm1.owner,30, ‘ ‘) || ‘ ‘|| rpad(pvm1.table_name, 30, ‘ ‘) || ‘ ‘|| rpad(pvm1.trigger_name,
30, ‘ ‘));
END IF;
END LOOP;
END;
/