Extracting info from v$sqlarea
222529Oct 7 2008 — edited Mar 24 2009Hi,
I use Oracle 9i and I am trying to extract what a session is exactly doing in a certain moment.
So, on sqlplus I execute
select a.sid,a.username,b.sql_text
from v$session a inner join v$sqlarea b
on a.sql_address=b.address and
a.sql_hash_value=b.hash_value
where sid=&sid;
but sql_text column is just 1000 characters size and I want the whole statement.
Is there any way to extract this information using sqlplus? I know that Enterprise Manager shows me this information, but to get sql text at the right moment, I would like to use a script.
Thanks in advance
Alex