Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Extracting info from v$sqlarea

222529Oct 7 2008 — edited Mar 24 2009
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 21 2009
Added on Oct 7 2008
8 comments
1,514 views