Improve company productivity with a Business Account.Sign Up

x
?
Solved

Can we find all queries which run against a production table?

Posted on 2011-09-06
6
Medium Priority
?
264 Views
Last Modified: 2012-06-21
is there a way to find out all the queries which run against a table in a production environment?
0
Comment
Question by:Rao_S
  • 3
  • 2
6 Comments
 
LVL 79

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 36488477
If you have auditing turned on.

If you do not, you can scan the SQL in memory but you will lose past SQL that has been flushed.

What are you looking to do?
0
 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 1500 total points
ID: 36488483
with auditting on yes,  if not, no there isn't a reliable way to capture them all
0
 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 1500 total points
ID: 36488488

simple example to catpure all activity for a table...

audit all on YOURSCHEMA.YOURTABLE


for more info...

http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_4007.htm#i2059073
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:Rao_S
ID: 36488670
after i run this:
AUDIT ALL ON schema1.table1;
how i find all sql that ran against the table?
0
 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 1500 total points
ID: 36488722
look in dba_audit_trail or your adump directory

depends on your audit_trail parameter.
0
 

Author Closing Comment

by:Rao_S
ID: 36498098
thank you....
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

602 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