Rem
Rem $Header: dbmspbt.sql 28-mar-98.14:38:26 ciyer Exp $
Rem
Rem dbmspbt.sql
Rem
Rem  Copyright (c) Oracle Corporation 1998. All Rights Reserved.
Rem
Rem    NAME
Rem      dbmspbt.sql - package specification for PL/SQL tracing
Rem
Rem    DESCRIPTION
Rem      This package provides routines for setting/clearing PL/SQL tracing
Rem      for the session.
Rem
Rem    NOTES
Rem      The collected trace data is dumped to the rdbms trace file. This
Rem      package must be created under SYS.
Rem
Rem    MODIFIED   (MM/DD/YY)
Rem    ciyer       03/28/98 - API to set/clear PL/SQL tracing
Rem    ciyer       03/28/98 - Created
Rem

REM ********************************************************************
REM THE FUNCTIONS SUPPLIED BY THIS PACKAGE AND ITS EXTERNAL INTERFACE
REM ARE RESERVED BY ORACLE AND ARE SUBJECT TO CHANGE IN FUTURE RELEASES.
REM ********************************************************************

REM ********************************************************************
REM THIS PACKAGE MUST NOT BE MODIFIED BY THE CUSTOMER.  DOING SO COULD
REM CAUSE INTERNAL ERRORS AND SECURITY VIOLATIONS IN THE RDBMS.
REM ********************************************************************

REM ********************************************************************
REM THIS PACKAGE MUST BE CREATED UNDER SYS.
REM ********************************************************************

create or replace package dbms_trace is
  ------------
  --  OVERVIEW
  --
  --  This package provides routines to start and stop PL/SQL tracing
  --
  
  -------------
  --  CONSTANTS
  --

  trace_all_calls          constant integer := 1;
  trace_enabled_calls      constant integer := 2;
  trace_all_exceptions     constant integer := 4;
  trace_enabled_exceptions constant integer := 8;
  
  --
  -- version history:
  --   1.0 - creation
  --
  trace_major_version constant binary_integer := 1;
  trace_minor_version constant binary_integer := 0;
  
  ----------------------------
  --  PROCEDURES AND FUNCTIONS
  --

  -- start trace data dumping in session
  procedure set_plsql_trace(trace_level integer);

  -- stop trace data dumping in session
  procedure clear_plsql_trace;
  
  -- get version number of trace package
  procedure plsql_trace_version(major out binary_integer,
                                minor out binary_integer);
  
end dbms_trace;
/
grant execute on dbms_trace to public;
drop public synonym dbms_trace;
create public synonym dbms_trace for sys.dbms_trace;
/
