get list of all sql's executed in a session with out sql trace [message #402104] |
Thu, 07 May 2009 11:19 |
yugi.adapala
Messages: 10 Registered: April 2009
|
Junior Member |
|
|
I need list of all SQL id's or SQL statements executed in a
session(we have an in house product which runs one process in a session).
why i need them:
1) I want to get the execution plans for the SQL's executed in a session(thats for one process). I know we can get execution plan in trace file but i just want to get execution plan from V$SQL_PLAN table
2) I want to pass all SQL statements to dbms_sqltune built in
package to get recommendations on how to tune them.
my approach now is:
turn on plsql trace with trace level set to 32(i.e., SQL's only)
i want to know if i can use v$active_session_history(limitation with this table is it can only hold sql's executed in last 1 second) or dba_hist_active_sess_history which is a snap shot table for v$active_session_history.
how can i get all SQL id's from dba_hist_active_sess_history executed in a session> or is there any other way to get SQL's executed in a session
i appreciate your thoughts and your work
thanks
Yugi
|
|
|
|
|
|
|
|
|