Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Response to how to stop tracing
Hi, Jacques,
I forgot the title of the message.
I don't think you can set the length of time for SQL tracing. But you can set level to 0 to stop tracing:
SQL> exec sys.dbms_system.set_ev([sid],[serial#],10046,0,'');
Where do you get the info about the last argument of sys.dbms_system.set_ev? By hacking into $ORACLE_HOME/rdbms/admin/prvtutil.plb, that argument looks like the name of something. And how do you reach the number 15 as a level?
Yong Huang
yong321_at_yahoo.com
you wrote:
The Oracle FAQ mentioned at the end of the list e-mails has the following hint for tracing:
# Trace SQL statements and show bind variables in trace output event = "10046 trace name context forever, level 12"
I want to do this for a session started by a program. So instead of alter session I need to use dbms_system.set_ev However, I don't see how I can specify a length of time (in this case "forever") to that procedure. It looks like the syntax should be (from inside SQL*Plus) execute sys.dbms_system.set_ev (sid, serial#, 10046, 15, 'context') ; where 10046 is the event for "enable SQL statement timing"
How do I indicate to set_ev the length of time for which tracing for that event should be enabled. If the default is forever, then I would guess that the only way to terminate the tracing is to end the session?
Jacques R. Kilchoer
(949) 754-8816
Quest Software, Inc.
8001 Irvine Center Drive
Irvine, California 92618
U.S.A.
http://www.quest.com
![]() |
![]() |