Databases Reference
In-Depth Information
Syntax
DBMS_SYSTEM.SET_EV(
si IN BINARY_INTEGER,
se IN BINARY_INTEGER
ev IN BINARY_INTEGER
le IN BINARY_INTEGER
nm IN VARCHAR2);
Parameters
Parameter
Description
si
Session identifier; corresponds to V$SESSION.SID
se
Session serial number; corresponds to V$SESSION.SERIAL#
ev
Event number between 10000 and 10999 for numeric events such as
10053 (optimizer trace). If nm is not NULL and ev is an ORACLE error
number outside of the range 10000 to 10999, the dump named by nm is
taken when the session throws the error specified. If ev=65535 and nm
is not NULL , an immediate dump of the type specified by nm is taken.
This is equivalent to ALTER SESSION SET EVENTS 'IMMEDIATE TRACE NAME
event_name LEVEL level ' , where event_name is the name of the dump
to take, for example SYSTEMSTATE , PROCESSSTATE , or ERRORSTACK , and
level is the event level. Named dumps are only possible within the
session of the caller, that is, they cannot be taken in a foreign session.
le
Level of the event; 0=disable event. Each event supports certain levels.
The maximum level is usually 10.
nm
Name, e.g. for taking diagnostic dumps. A list of permissible dump
names is available by calling ORADEBUG DUMPLIST as user SYS in
SQL*Plus. If nm is an empty string ( '' , i.e. two single quotes without
any characters in between), the call to DBMS_SYSTEM.SET_EV is equivalent
to ALTER SESSION SET EVENTS ' event TRACE NAME CONTEXT FOREVER, LEVEL
level ', where event is a numeric event such as 10046 and level is the
event level.
Usage Notes
When using a numeric event such as 10046, set nm to an empty string (passing NULL does not
work, although the DBMS normally treats empty strings as NULL ). If SET_EV is used incorrectly
or with an si or se that does not exist, the procedure call does not have any effect and no excep-
tion is thrown.
Examples
The following examples illustrate both uses of DBMS_SYSTEM.SET_EV :
￿
Setting an event at session level (recommended for Shared Server database sessions)
￿
Taking a named dump
 
Search WWH ::




Custom Search