Skip to Main Content

SQL & PL/SQL

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!

recently sql executed by applications

668412Nov 3 2008 — edited Nov 4 2008
Dear All,

I would like to build a debug module for my application and the modules can display latest or recent sql(eg 10) executed by the application.

I have found a similiar sql but this sql only list last sql

select a.username, a.terminal, a.program, b.sql_text
from v$session a, v$sqlarea b
where a.audsid=(select userenv('sessionid') from dual)
and a.sql_address=b.address
;

Are there any way to list 20 recently sql executed by application?

Thx!

Reference Material;
1. View the current session's last sql : oracle, session, last
http://www.experts-exchange.com/Database/Oracle/Q_20973836.html

2. AskTom Discusssion
http://asktom.oracle.com/pls/ask/f?p=4950:8:519498075307800596::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:497421739750,
This post has been answered by JustinCave on Nov 3 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 2 2008
Added on Nov 3 2008
8 comments
332 views