Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to derive the username that owns the SQL in V$SQLAREA
On Dec 2, 8:12 am, Peter Teoh <htmldevelo..._at_gmail.com> wrote:
>
> I have given up. Anyone knows the answer?
Sorry, I have found the answer from Oracle Forums:
select username, sql_text
from v$session s, v$sqlarea sql
where s.sql_address = sql.address and s.sql_hash_value =
sql.hash_value;
It is also wrong. Every time a user login, the following will be added to the list (according to the above SQL):
SELECT DECODE('A','A','1','2') FROM DUAL And all subsequently SQL issued by that user is not shown.
So how to get the list of all SQL belonging to that user? Received on Sat Dec 01 2007 - 18:38:45 CST
![]() |
![]() |