Object Dependency Report

Object Dependency Report

set pages 999 feedback off lines 80 trims on echo off verify off
column owner format a8 heading "Owner"
column type format a4 tru heading "Type"
column name format a25 heading "Name"
column referenced_owner format a8 heading "Depend|Owner"
column referenced_type format a4  tru heading "Depend|Type"
column referenced_name format a25 heading "Depend On Name"
ttitle "Object Dependency Report"
select owner, type, name,
       referenced_owner, referenced_type, referenced_name
from dba_dependencies
where ((owner like upper('%')
and   name  like upper('%') ) or
      (referenced_owner like upper('%')
and   referenced_name  like upper('%') ))
and   referenced_owner != 'SYS'
and   referenced_type != 'NON-EXISTENT'
order by owner, type, name
/