DBA Dependencies (uses)

Description

Categories
Enginatics
Repository
GitHub
Hierarchical report showing all database objects that the specified objects, e.g. views or packages, use or depend on (top to bottom).

Select several object names to list the hierarchy of each, one after the other.

Show Table Statistics adds the optimizer statistics and the indexes of every table in the hierarchy, to review the access paths of a view or package.

SQL 58 lines

Parameters 4

ParameterTypeList of values SQL
OwnerLOV
do.owner=:owner
Object TypeLOV
do.object_type=:object_type
Object NameLOV
do.object_name=:object_name
Show Table StatisticsLOV
,
(select dt.num_rows from dba_tables dt where x.object_type='TABLE' and x.owner=dt.owner and x.object_name=dt.table_name) num_rows,
(select dt.blocks from dba_tables dt where x.object_type='TABLE' and x.owner=dt.owner and x.object_name=dt.table_name) blocks,
(select dt.last_analyzed from dba_tables dt where x.object_type='TABLE' and x.owner=dt.owner and x.object_name=dt.table_name) last_analyzed,
(
select
ltrim(xmlagg(xmlelement(e,chr(10)||di.index_name||' ('||(select listagg(dic.column_name,', ') within group (order by dic.column_position) from dba_ind_columns dic where di.owner=dic.index_owner and di.index_name=dic.index_name)||')'||decode(di.uniqueness,'UNIQUE',' unique')) order by di.index_name).extract('//text()').getclobval(),chr(10))
from
dba_indexes di
where
x.object_type='TABLE' and
di.index_type<>'LOB' and
x.owner=di.table_owner and
x.object_name=di.table_name
) indexes