Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is thjere a way to find all sql satements run by a session
sql tracing
You can enable tracing for your own session,
alter session set sql_trace=true;
...or, if you have execute on sys.dbms_system.set_ev, then for another
existing session:
exec sys.dbms_system.set_ev(sid,serial#,10046,1,'')
In both cases, you will capture the sql from the time tracing was enabled going forward (but not prior to that time).
You can also set tracing it for all future sessions (which could be too much if you are doing it on a busy database):
init.ora
sql_trace=true
..or, if you use after logon trigger, for some future sessions (you
decide which ones in the logic of the trigger), e.g.
http://www.oracle.com/technology/oramag/code/tips2003/042703.html
Kirill Received on Fri Mar 24 2006 - 15:52:12 CST