Oracle Objects Dependent On Report

This script displays all database objects that depend on a specified object. It queries the ALL_DEPENDENCIES view to identify dependent objects, helping DBAs and developers understand impact analysis before modifying or dropping database objects.

oraclesqlreporting-analyticsv1.0.0
0 stars0 downloads14 views0 comments
By OracleDba • Created

Code

(24 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- -----------------------------------------------------------------------------------
-- File Name    : https://oracle-base.com/dba/monitoring/code_dep_on.sql
-- Author       : Tim Hall
-- Description  : Displays all objects dependant on the specified object.
-- Call Syntax  : @code_dep_on (schema-name or all) (object-name)
-- Last Modified: 15/07/2000
-- -----------------------------------------------------------------------------------
SET VERIFY OFF
SET LINESIZE 255
SET PAGESIZE 1000
BREAK ON type SKIP 1

COLUMN owner FORMAT A20

SELECT a.type,
       a.owner,
       a.name
FROM   all_dependencies a
WHERE  a.referenced_owner = DECODE(UPPER('&1'), 'ALL', a.referenced_owner, UPPER('&1'))
AND    a.referenced_name  = UPPER('&2')
ORDER BY 1,2,3;

SET PAGESIZE 22
SET VERIFY ON

General Comments(0)

Tip: Click on a line number in the code to add a line-specific comment

No general comments yet. Be the first to comment!