행위

ORACLE 트리거 추출쿼리

DB CAFE

/** 
 * 트리거 추출  
 **/ 
select  OWNER 
    ,  NAME 
    ,  TYPE 
    ,  LINE 
    ,  decode(line,1,'CREATE OR REPLACE ' 
        ||replace(text,'PACKAGE BODY ','PACKAGE BODY ' 
        ||owner 
        ||'.'),text) AS PKG_SOURCE 
from dba_source where type='TRIGGER' and owner='$ownerName';