Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Is thjere a way to find all sql satements run by a session

Re: Is thjere a way to find all sql satements run by a session

From: <krichine_at_juno.com>
Date: 24 Mar 2006 13:52:12 -0800
Message-ID: <1143237132.627748.75760@i40g2000cwc.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US