Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: script to show heirarchical list of object dependencies for a

Re: script to show heirarchical list of object dependencies for a

From: <Rachel_Carmichael_at_Sonymusic.com>
Date: Fri, 10 May 2002 05:48:20 -0800
Message-ID: <F001.0045E278.20020510054820@fatcity.com>

How is this essentially different than what you can get from utldtree.sql?

when Kevin Loney and I were writing the Annotated Archives a few years ago, I tried to write a script that would show the dependencies, because part of the reason for the book was to provide "home-grown" scripts that wre documented. I ended up essentially rewriting the cod from utldtree.sql and we gave up that particular effort.

|--------+----------------------->

| | |
| | |
| | jack_silvey_at_y|
| | ahoo.com |
| | |
| | 05/09/2002 |
| | 07:03 PM |
| | Please |
| | respond to |
| | ORACLE-L |
| | |
|--------+-----------------------> >----------------------------------------------------| | | | To: ORACLE-L_at_fatcity.com | | cc: (bcc: Rachel Carmichael) | | Subject: script to show heirarchical list| | of object dependencies for a given object | >----------------------------------------------------|

Greetings listers,

Ever worry about wrinkles, loss of hair, and bad breath?

Well, the following script can't help you with THAT, but it CAN show you a heirarchical list of objects that depend upon the given object! Just pass in &1=owner and &2=object name, and viola! No more changing objects without knowing what depends on them (and might break). (The reason for the temp table is that you can't do recursive self-join sql on complex views.) This can be a very useful script if you make production database changes.

prompt
prompt objects depending on &1. &2:
prompt

set termout off
set head off
set verify off

drop table depends;

create table depends as select * from
sys.dba_dependencies tablespace tools;

set termout on

select '*'||lpad(' ',level+3)||type||'
'||owner||'.'||name
from depends
connect by prior owner = referenced_owner and prior name = referenced_name
and prior type = referenced_type
start with referenced_owner = upper('&1') and referenced_name = upper('&2')
and owner is not null
/

good luck,

jack silvey



Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th! http://shopping.yahoo.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Jack Silvey
  INET: jack_silvey_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: Rachel_Carmichael_at_Sonymusic.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri May 10 2002 - 08:48:20 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US