Oracle

게시글 보기
작성자 유건데이타 등록일 2015-05-18
제목 특정 OWNER 소유의 TRIGGER_NAME, TRIGGER_TYPE, TRIGGERING_EVE
특정 OWNER 소유의 TRIGGER_NAME, TRIGGER_TYPE, TRIGGERING_EVENT 확인 방법
========================================================================

PURPOSE
-------

이 자료는 특정 user가 소유하고 있는 trigger에 대한 정보를 보는 방법
에 대한 자료이다.


Explanation
-----------

다음 SQL은 SCOTT user가 소유하고 있는 test라는 table에 걸려 있는
모든 trigger name과 trigger type, triggering event, status,
trigger가 적용되는 column_name, 해당 object의 validity까지 한번에
조회하도록 하는 SQL 문장이다.

select t.owner, t.trigger_name,
t.trigger_type,
t.triggering_event,
t.status,
c.column_name,
o.status as "VALIDITY"
from dba_triggers t, dba_trigger_cols c, dba_objects o
where t.owner = c.trigger_owner (+)
and t.trigger_name = c.trigger_name (+)
and t.owner = o.owner
and t.trigger_name = o.object_name
and o.object_type = 'TRIGGER'
and t.table_owner = 'SCOTT'
and t.table_name = 'TEST';

OWNER TRIGGER_NAME TRIGGER_TYPE TRIGGERING_EVENT STATUS COLUMN_NAME VALIDIT
----- ------------ -------------- ---------------- ------- ----------- -------
SCOTT TEST_A AFTER EACH ROW UPDATE ENABLED A INVALID


Example
-------
none


Reference Documents
-------------------
Comment
등록된 코멘트가 없습니다.