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!

All the sqls executed by a session

chinnaNov 15 2007 — edited Nov 16 2007
This is in 10gR2. I want to see all the SQLs executed by a session w/o tracing the session. I have this query using ASH but I am not sure if I am getting the correct results. It looks like for every SQL execution, this query shows 3 rows. Could somebody check this. Thanks in advance.

select ash.SESSION_ID SID, ash.sample_time TIME, sa.sql_text
from v$active_session_history ash, v$sqlarea sa
where session_id = 106
and ash.sql_id = sa.sql_id
order by 2 desc;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 14 2007
Added on Nov 15 2007
8 comments
2,888 views