Re: SQL to find the list of objects that reference a table

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 14 Aug 2008 09:56:48 -0700
Message-ID: <1218733000.736171@bubbleator.drizzle.com>


Saravanan wrote:
> On Aug 14, 12:30 pm, Saravanan <vsr.sarava..._at_gmail.com> wrote:

>> Hi all
>>     I want to find all the objects that reference a given table. Can
>> anyone please provide the SQL query to do the same?
>>
>> Thanks
>> Saravanan

>
> Hi all
> Found the query here
> http://jenniferlinca.wordpress.com/2008/01/22/finding-foreign-key-constraints-in-oracle/
>
> Thanks
> Saravanan

That would be fine but it would also be incorrect with respect to the question you asked. You said "objects" and that includes views and procedures, etc.

Gazzag has pointed you to dba_dependencies which gives it to you at the first level.

If you want the entire story then go to Morgan's Library at www.psoug.org and look up the DBMS_UTILITY built-in package. It contains a GET_DEPENDENCY procedure that is far more robust.

-- 
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Thu Aug 14 2008 - 11:56:48 CDT

Original text of this message