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: Prepared statement parameter values while tracing

Re: Prepared statement parameter values while tracing

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Wed, 06 Jul 2005 00:06:02 GMT
Message-Id: <pan.2005.07.06.00.06.01.179342@sbcglobal.net>


On Tue, 05 Jul 2005 08:16:28 -0700, OcNavi wrote:

> Is there a way to trace the statement showing the values of the
> parameters?
>
> Thanks in advance.

Yes, there is. Event 10046 will show bin parameters at level 10. Depending on the version of your database, you can use DBMS_SUPPORT (V9) or DBMS_MONITOR (V10). If you want to set tracing for your session only, you can do it like this:
 (SID=32,SERIAL#=16,EVENT=10046, LEVEL=12))  exec sys.dbms_system.set_ev(32,16,10046,12,'')

The following script will read events set for your session:

declare
evin integer := 10046;
evout integer := 0;
begin
for evin in 0..20000
loop
sys.dbms_system.read_ev(evin,evout);
if (evout != 0)
then dbms_output.put_line('Event is:'||evin||' level:'||evout); end if;
end loop;
end;
/

You can also use DB trigger to start tracing using 'alter session' command. There are many things you can do. Take your pick.

-- 
http://www.mgogala.com
Received on Tue Jul 05 2005 - 19:06:02 CDT

Original text of this message

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