track queries executed by the user/applictions [message #248669] |
Sat, 30 June 2007 03:15 |
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 |
|
Michel Cadot
Messages: 68718 Registered: March 2007 Location: Saint-Maur, France, https...
|
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
|
|
|