Chapter 40. DBMS_SYSTEM

Table of Contents

40.1. Overview
40.2. Procedure

This chapter briefly introduces the DBMS_SYSTEM package, and describes how to use the procedures and functions of the package.

40.1. Overview

DBMS_SYSTEM provides a procedure used to control the system under special circumstances. Only the SYS user can use this package.

40.2. Procedure

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

        sid                 IN      NUMBER,
        serial#             IN      NUMBER,
        sql_trace           IN      BOOLEAN
  • Parameter

    sidSession ID.
    serial#Session serial number.
    sql_traceOption to create a SQL trace log.
  • Example

        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;