Home » RDBMS Server » Server Administration » track queries executed by the user/applictions
track queries executed by the user/applictions [message #248669] Sat, 30 June 2007 03:15 Go to next message
gopalit1985
Messages: 1
Registered: June 2007
Junior Member
Hi ,
Iam stuck in this query :
how to track sqlqueries /actions executed by an particular user or application .

For now i have one query ie
select a.sid, a.serial#, b.sql_text
from v$session a, v$sqlarea b
where a.sql_address=b.address
and a.username='SCOTT';

But it only works for queries which contains "count(*)" .
How to overcome this and get all queries run by this user .

Pls help me ....
Re: track queries executed by the user/applictions [message #248671 is a reply to message #248669] Sat, 30 June 2007 04:01 Go to previous message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can't track ALL statements from a user or an application unless you activate the traces for ALL sessions belonging to your criteria and have many GB of disks and supports your performances will be down.

In sqlarea you get what you can at the frequency you poll it.

Another way is to activate Fine-Grained Auditing and logs all what happens with the same effect on performances and database space.

Regards
Michel
Previous Topic: trigger on MGMT_AVAILABILITY table puts OEM in a weird state.
Next Topic: ASM - Raw devices owner's matter
Goto Forum:
  


Current Time: Fri Dec 02 20:28:41 CST 2016

Total time taken to generate the page: 0.07725 seconds