Message-Id: <10750.127330@fatcity.com> From: Jacques Kilchoer Date: Tue, 23 Jan 2001 14:31:03 -0800 Subject: using dbms_system.set_ev instead of alter session - how to indica This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C0858C.2B319800 Content-Type: text/plain; charset="iso-8859-1" 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? ------ any ignorant comments made are the sole responsibility of J. R. Kilchoer and should not reflect adversely upon my employer. Jacques R. Kilchoer (949) 754-8816 Quest Software, Inc. 8001 Irvine Center Drive Irvine, California 92618 U.S.A. http://www.quest.com ------_=_NextPart_001_01C0858C.2B319800 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable using dbms_system.set_ev instead of alter session - how to = indicate length of tracing?

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 =3D "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?

------
any ignorant comments made are the sole = responsibility of J. R. Kilchoer and should not reflect adversely upon = my employer.

 
Jacques R. Kilchoer
(949) 754-8816
Quest Software, Inc.
8001 Irvine Center Drive
Irvine, California 92618
U.S.A.
http://www.quest.com