Database Reference
In-Depth Information
SET_SQL_TRACE_IN_SESSION Procedure
This procedure enables SQL trace in a database session.
Syntax
DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION(
sid IN NUMBER,
serial# IN NUMBER,
sql_trace IN BOOLEAN);
Parameters
Parameter
Description
sid
Session id; corresponds to V$SESSION.SID
serial#
Session serial number; corresponds to V$SESSION.SERIAL#
sql_trace
TRUE turns tracing on, FALSE turns tracing off
Usage Notes
No exception is raised when one of the parameters SID or SERIAL# are incorrect. Use the packaged
procedure DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION only if you are sure that you don't need to
trace wait events and bind variables.
Examples
SQL> SELECT sid, serial# FROM v$session WHERE username='NDEBES';
SID SERIAL#
---------- ----------
35 283
SQL> EXEC dbms_system.set_sql_trace_in_session(35, 283, true);
WAIT_FOR_EVENT Procedure
This procedure causes the calling session to artificially wait for a certain amount of seconds for
the event specified. The event must be a wait event from V$EVENT_NAME.NAME . If SQL trace at
level 8 or 12 is enabled, artificially generated wait events are emitted to a trace file. WAIT_FOR_
EVENT is useful for developers of extended SQL trace profilers who need to make sure that their
profiler software understands all the wait events that might be emitted to a trace file. It would
be hard to write software that is able to cause all of the 872 wait events in Oracle10 g for the
purpose of testing a profiler. Even more so, since Oracle10 g wait events are logged with various
meaningful parameter names instead of p1 , p2 , p3 in Oracle9 i and earlier releases.
 
Search WWH ::




Custom Search