Oracle Code Dependencies Report

This script displays all dependencies for a specified database object. It queries the ALL_DEPENDENCIES view to show referenced objects, their owners, types, and database links, helping developers and DBAs understand object relationships and code dependencies.

oraclesqlreporting-analyticsv1.0.2
0 stars0 downloads17 views0 comments
By OracleDba • Created

Code

(28 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
25
26
27
28
-- -----------------------------------------------------------------------------------
-- File Name    : https://oracle-base.com/dba/monitoring/code_dep.sql
-- Author       : Tim Hall
-- Description  : Displays all dependencies of specified object.
-- Call Syntax  : @code_dep (schema-name or all) (object-name)
-- Last Modified: 15/07/2000
-- -----------------------------------------------------------------------------------
SET VERIFY OFF
SET LINESIZE 255
SET PAGESIZE 1000
BREAK ON referenced_type SKIP 1

COLUMN referenced_type FORMAT A20
COLUMN referenced_owner FORMAT A20
COLUMN referenced_name FORMAT A40
COLUMN referenced_link_name FORMAT A20

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

SET VERIFY ON
SET PAGESIZE 22

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!