Skip to content

Commit

Permalink
added object status from dba_objects
Browse files Browse the repository at this point in the history
  • Loading branch information
jkstill committed May 29, 2024
1 parent 22fde21 commit 3dfe846
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions sql/dba_dependencies.sql
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ with dep_recurse (
, referenced_type
, referenced_link_name
, dependency_type
, lvl
, status
, lvl
, idx
) as (
select
Expand All @@ -103,12 +104,16 @@ with dep_recurse (
, d.referenced_type
, d.referenced_link_name
, d.dependency_type
, o.status
, 1 as lvl
, rownum - 1 as idx
FROM dba_dependencies d
FROM dba_dependencies d, dba_objects o
WHERE d.owner = '&u_owner'
and d.name = '&u_object'
and d.type = '&u_type'
and o.owner = d.owner
and o.object_name = d.name
and o.object_type = d.type
-- anchor member
union all
-- recursive member
Expand All @@ -121,13 +126,18 @@ with dep_recurse (
, d.referenced_type
, d.referenced_link_name
, d.dependency_type
, o.status
, dr.lvl +1 as lvl
, dr.idx +1 as idx
FROM dba_dependencies d
JOIN dep_recurse dr
on d.owner = dr.referenced_owner
and d.name = dr.referenced_name
and d.type = dr.referenced_type
JOIN dba_objects o
on o.owner = d.owner
and o.object_name = d.name
and o.object_type = d.type
)
search depth first by owner set order1 -- display in std heirarchical order
--search breadth first by owner set order1 -- display in order of levels
Expand All @@ -137,12 +147,14 @@ search depth first by owner set order1 -- display in std heirarchical order
&u_hier_view lpad(' ', lvl*2-1,' ') || referenced_owner ||'.'|| referenced_name object
&u_hier_view , idx
&u_hier_view , referenced_type
&u_hier_view , status
&u_hier_view from dep_recurse dr
--&u_hier_view order by idx
--
&u_list_view SELECT distinct
&u_list_view referenced_owner ||'.'|| referenced_name object
&u_list_view , referenced_type
&u_list_view , status
&u_list_view from dep_recurse dr
&u_list_view order by 1
/
Expand Down

0 comments on commit 3dfe846

Please sign in to comment.