Table Usage [message #371953] |
Tue, 26 December 2000 20:01 |
Nicholas Pinakis
Messages: 2 Registered: December 2000
|
Junior Member |
|
|
Using TOAD I can select a table in the schema browser and select the "USED BY TAB" it displays a list that shows every trigger, package, procedure, view etc that has a relationship with this table.
I suspect that TOAD is either scanning the Database or more likely running an SQL script to provide this information.
Can someone help with some SQL script that I can run to provide the same listing outside of TOAD (ie in SQL Plus) ?
Thanks in advance for any assistance.
Cheers...Nicholas
|
|
|
Re: Table Usage [message #371957 is a reply to message #371953] |
Wed, 27 December 2000 04:53 |
Marcus Fernando
Messages: 34 Registered: September 2000
|
Member |
|
|
SELECT nested_level, type, name
FROM deptree
ORDER BY seq#;
This sql list all dependent objects.
SELECT * FROM ideptree;
This sql lists the same information in tree structure.
|
|
|
Re: Table Usage [message #371960 is a reply to message #371953] |
Wed, 27 December 2000 09:26 |
me
Messages: 66 Registered: August 2000
|
Member |
|
|
if you select privileges on dba views:
SELECT *
FROM DBA_DEPENDENCIES
WHERE REFERENCED_OWNER = 'OBJECT OWNER'
AND REFERENCED_NAME = 'OBJECT NAME'
if not use this one:
SELECT *
FROM USER_DEPENDENCIES
WHERE REFERENCED_NAME = 'OBJECT OWNER'
|
|
|