Chapter 19. DBMS_MONITOR

Table of Contents

19.1. Overview
19.2. Procedures and Functions
19.2.1. CLIENT_ID_TRACE_DISABLE
19.2.2. CLIENT_ID_TRACE_ENABLE
19.2.3. DATABASE_TRACE_DISABLE
19.2.4. DATABASE_TRACE_ENABLE
19.2.5. SESSION_TRACE_DISABLE
19.2.6. SESSION_TRACE_ENABLE

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

19.1. Overview

DBMS_MONITOR is used for performance monitoring by instance, session, and Client ID.

Performance can be monitored by controlling SQL tracing for each item.

19.2. Procedures and Functions

This section describes the procedures and functions provided by the DBMS_MONITOR package, in alphabetical order.

19.2.1. CLIENT_ID_TRACE_DISABLE

Disables SQL tracing for the sessions of the specified client ID.

Details about the CLIENT_ID_TRACE_DISABLE procedure are as follows:

  • Prototype

    DBMS_MONITOR.CLIENT_ID_TRACE_DISABLE
    (
        client_id       IN      VARCHAR2
    )
  • Parameter

    ParameterDescription
    client_idClient ID of the target sessions to disable SQL tracing for.

19.2.2. CLIENT_ID_TRACE_ENABLE

Enables SQL tracing for the sessions of the specified client ID.

Details about the CLIENT_ID_TRACE_ENABLE procedure are as follows:

  • Prototype

    DBMS_MONITOR.CLIENT_ID_TRACE_ENABLE
    (
        client_id       IN      VARCHAR2
    )
  • Parameter

    ParameterDescription
    client_idClient ID of the target sessions to enable SQL tracing for.

19.2.3. DATABASE_TRACE_DISABLE

Disables SQL tracing for the entire database server instance.

Details about the DATABASE_TRACE_DISABLE procedure are as follows:

  • Prototype

    DBMS_MONITOR.DATABASE_TRACE_DISABLE

19.2.4. DATABASE_TRACE_ENABLE

Enables SQL tracing for the entire database server instance.

Details about the DATABASE_TRACE_ENABLE procedure are as follows:

  • Prototype

    DBMS_MONITOR.DATABASE_TRACE_ENABLE

19.2.5. SESSION_TRACE_DISABLE

Disables SQL tracing for the sessions with the specified session ID.

Details about the SESSION_TRACE_DISABLE procedure are as follows:

  • Prototype

    DBMS_MONITOR.SESSION_TRACE_DISABLE
    (
        session_id      IN      BINARY_INTEGER DEFAULT NULL,
        serial_num      IN      BINARY_INTEGER DEFAULT NULL
    )
  • Parameter

    ParameterDescription
    session_id

    Session ID to disable SQL tracing for.

    If set to NULL, this is set to the current session.

    serial_num

    Session serial number to disable SQL tracing for.

    If set to NULL, disable SQL tracing for the Session ID regardless of the serial number.

19.2.6. SESSION_TRACE_ENABLE

Enables SQL tracing for the sessions with the specified session ID.

Details about the SESSION_TRACE_ENABLE procedure are as follows:

  • Prototype

    DBMS_MONITOR.SESSION_TRACE_ENABLE
    (
        session_id      IN      BINARY_INTEGER DEFAULT NULL,
        serial_num      IN      BINARY_INTEGER DEFAULT NULL
    )
  • Parameter

    ParameterDescription
    session_id

    Session ID to enable SQL tracing for.

    If set to NULL, this is set to the current session.

    serial_num

    Session serial number to enable SQL tracing for.

    If set to NULL, enable SQL tracing for the Session ID regardless of the serial number.