Table of Contents
This chapter briefly introduces the DBMS_SYSTEM package, and describes how to use the procedures and functions of the package.
DBMS_SYSTEM provides a procedure used to control the system under special circumstances. Only the SYS user can use this package.
This section describes the procedure provided by the DBMS_SYSTEM package.
Starts or stops creating a SQL trace log for a specified session. The identifier and the serial number of the session can be found in the V$SESSION view.
The SQL trace log is created in the $TB_HOME/instance/$TB_SID/log/sqltrace directory.
Details about the SET_SQL_TRACE_IN_SESSION procedure are as follows:
Prototype
DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION ( sid IN NUMBER, serial# IN NUMBER, sql_trace IN BOOLEAN );
Parameter
Parameter | Description |
---|---|
sid | Session ID. |
serial# | Session serial number. |
sql_trace | Option to create a SQL trace log. |
Example
begin
for c in (select sid, serial# from v$session where username = 'TIBERO') loop
DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION(c.sid, c.serial#, true);
end loop;
end;
/