Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to find the dependency information for views?

742522Dec 22 2009 — edited Dec 30 2009
Hi All,

There is reuirement where in we have to find the dependency information for all the tables which are used in particular view...along with remote database connections.. For this we have tried to use following query..

Select * from user_dependencies
start with name =’SAMPLE_VIEW’
connect by prior trim(referenced_name)=trim(name);

The view consists of three tables :

Create view sample_view as
select t1.col1,
T2.col2,
T3.col3,
From
Table1,
Table2@prd1,
Table3@prd2
Where
T1.col5=t2.col5
And T1.col5=t3.col5;

But the ouptut is :

name Type Reference_name Reference_type Reference_link_name
sample_view View Table1 Table null

So what will be the magic query which will give the all the tables in the view sample_view??
Desired result:


name Type Reference_name Reference_type Reference_link_name
sample_view View Table1 Table null
sample_view View Table2 Table prd1
sample_view View Table3 Table prd2

Thanks all in Advance!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 27 2010
Added on Dec 22 2009
9 comments
31,701 views