Solved

How do I find all funtions/procedures/packages which write/update/read to/from a table?

Posted on 2014-01-28
4
490 Views
Last Modified: 2014-01-29
How do I find all funtions/procedures/packages which write/update/read to/from a table?
I dont want to audit the table as yet...
0
Comment
Question by:Rao_S
4 Comments
 
LVL 15

Accepted Solution

by:
Franck Pachot earned 300 total points
Comment Utility
Hi,
As an example, the following will list all procedure/function/package that references the SYS.DUAL table:

select owner,name,type from dba_dependencies 
where referenced_owner='SYS' and referenced_name='DUAL' 
and type like 'PACKAGE%' or type in ('PROCEDURE','FUNCTION');

Open in new window


Regards,
Franck.
0
 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 100 total points
Comment Utility
dba_dependencies will work as long as the procedures do not use dynamic sql with an execute immediate.

If that is a possibility you need to look for the table name in the dba_source view with an INSTR of REGEXP_INSTR call.
0
 
LVL 34

Assisted Solution

by:johnsone
johnsone earned 100 total points
Comment Utility
If dynamic SQL is a possibility, even a search of DBA_SOURCE isn't foolproof.  The name of the object could be a parameter passed from an external program and wouldn't be in the source code.
0
 

Author Closing Comment

by:Rao_S
Comment Utility
thank you all, franck's solution worked great for me, i dint try the other 2 solutions, but they are very good information to have..
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now