Oracle DBMS_SUPPORT
Version 26ai

General Information
Library Note Morgan's Library Page Header
The best Oracle News for FY2026

Oracle Database 26ai will be available on generic Linux platforms in January and soon on AIX and Windows
Purpose Provides an API for tracing that includes access features not available with SQL_TRACE. This package is not part of the default installation and only supports database versions 7.2 through 8.0.5.

Normally I'd leave something like this out of the library but so far Oracle hasn't removed it from RDBMS/ADMIN so it keeps its place in the library.
AUTHID DEFINER
Dependencies
DBMS_STANDARD V$MYSTAT V$SESSION
DBMS_SYSTEM    
Documented No
First Available 7.2
Installation conn / as sysdba

@?/rdbms/admin/dbmssupp.sql

GRANT execute ON dbms_support TO uwclass;

CREATE PUBLIC SYNONYM dbms_support FOR dbms_support;
Security Model Owned by SYS with no privileges granted
Source {$ORACLE_HOME}/rdbms/admin/dbmssupp.sql
{$ORACLE_HOME}/rdbms/admin/prvtsupp.plb
Subprograms
 
MYSID
Return Session SID dbms_support.mysid RETURN NUMBER;
SELECT sid FROM v$mystat WHERE rownum = 1;

 SID
----
 277



SELECT SYS_CONTEXT('USERENV', 'SID');

 SYS_CONTEXT('USERENV', 'SID')
------------------------------
                           277


SELECT dbms_support.mysid;

 MYSID
------
   277
 
PACKAGE_VERSION
Returns the minimum Oracle version of PL/SQL supported dbms_support.package_version RETURN VARCHAR2;
SELECT dbms_support.package_version;

col package_version format a70

PACKAGE_VERSION
---------------------------------------------------------------------
DBMS_SUPPORT Version 1.0 (17-Aug-1998) - Requires Oracle 7.2 - 8.0.5
 
START_TRACE
Starts Tracing In The Current Session dbms_support.start_trace(
waits IN BOOLEAN DEFAULT TRUE,
binds IN BOOLEAN DEFAULT FALSE);
DECLARE
 w BOOLEAN := TRUE;
 b BOOLEAN := TRUE;
BEGIN
  dbms_support.start_trace(w,b);
END;
/

PL/SQL procedure successfully completed.
 
START_TRACE_IN_SESSION
Starts tracing in the specified session dbms_support.start_trace_in_session (
sid    IN NUMBER,
serial IN NUMBER,
waits  IN BOOLEAN DEFAULT TRUE,
binds  IN BOOLEAN DEFAULT FALSE);
DECLARE
 s gv$session.sid%TYPE;
 r gv$session.serial#%TYPE;
 w BOOLEAN := TRUE;
 b BOOLEAN := TRUE;
BEGIN
  SELECT sid, serial#
  INTO s, r
  FROM gv$session
  WHERE username = 'UWCLASS';

  dbms_support.start_trace_in_session(s, r, w, b);

  dbms_lock.sleep(100);

  dbms_support.stop_trace_in_session(s, r);
END;
/
 
STOP_TRACE
Stops tracing dbms_support.stop_trace;
exec dbms_support.stop_trace;

PL/SQL procedure successfully completed.
 
STOP_TRACE_IN_SESSION
Stops tracing within a specified session dbms_support.stop_trace_in_session(
id     IN NUMBER,
serial IN NUMBER);
See START_TRACE_IN_SESSION Demo Above

Related Topics
Built-in Functions
Built-in Packages
DBMS_MONITOR
DBMS_SYSTEM
DBMS_TRACE
Trace & TKPROF
What's New In 21c
What's New In 26ai

Morgan's Library Page Footer
This site is maintained by Daniel Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2026 Daniel A. Morgan All Rights Reserved