how to get list of objects which are using a table [message #19534] |
Tue, 26 March 2002 00:39 |
ksr
Messages: 112 Registered: January 2002
|
Senior Member |
|
|
Hi,
What is the script to see all the objects(like procedures,packages,views etc) which use a particular table which i want.
eg: if i have a table test1,i want to know what all objects use this table.
What is the sql statement to find out this.
any help is appreciated
|
|
|
|
Re: how to get list of objects which are using a table [message #19539 is a reply to message #19534] |
Tue, 26 March 2002 09:19 |
Grant
Messages: 578 Registered: January 2002
|
Senior Member |
|
|
Just drop the table and see what breaks! Kidding.
For TYPE
You would "select owner,name,type from dba_source where text like '%TEST1%';
For VIEWS:
select owner,view_name from dba_views where text like '%TEST1%';
As you can see there is no easy way. You would have to build queries on DBA_TRIGGERS, DBA_SEQUENCES, and your constarint views to get all the info. You might be better off getting a script that creates all the objects then do a search on it (http://www.orsweb.com/downloads/source/74.html or http://www.oracle.com/oramag/code/ has a schema build somewhere). This uses an export file and is free C:Program FilesDataBeeHelpmanualhome.htm
You could also download TOAD. It will give you "USES" and "USED BY".
|
|
|