Search Results trace_enabled_calls
Overview
SYS.DBMS_TRACE is a server-side PL/SQL package that provides the runtime interface for starting, stopping, and controlling the PL/SQL trace facility (the PL/SQL Virtual Machine trace, historically associated with the MTRACE / LTRACE debugging infrastructure). It does not perform business logic of its own; rather, it is a diagnostics utility used throughout Oracle E-Business Suite 12.1.1 and 12.2.2 to capture execution-level detail from PL/SQL program units when standard SQL trace (event 10046) is insufficient.
In the EBS context, DBMS_TRACE is the mechanism by which developers and DBAs obtain call/return sequences, exception paths, per-line execution information, and PL/SQL-level SQL statement activity from forms-based server code, concurrent program PL/SQL, and stored APIs. Because tracing is controlled by integer flag constants defined in the package specification, the facility can be scoped narrowly — for example, tracing only calls made from units compiled in debug mode — which limits the volume of collected data and the associated overhead on a production or test instance.
Key Procedures and Functions
The documented interface comprises ten members:
- SET_PLSQL_TRACE — Enables tracing, accepting a combination of the level constants (
TRACE_ALL_CALLS,TRACE_ENABLED_CALLS,TRACE_ALL_EXCEPTIONS,TRACE_ENABLED_EXCEPTIONS,TRACE_ALL_SQL,TRACE_ENABLED_SQL,TRACE_ALL_LINES,TRACE_ENABLED_LINES), optionally with control flags such asTRACE_PAUSE,TRACE_RESUME,TRACE_LIMIT,NO_TRACE_ADMINISTRATIVE, andNO_TRACE_HANDLED_EXCEPTIONS. - GET_PLSQL_TRACE_LEVEL — Returns the currently active trace level flags for the session.
- GET_PLSQL_TRACE_RUNNUMBER — Returns the run number identifying the current (or most recent) trace run, allowing the collected trace rows to be correlated and queried.
- CLEAR_PLSQL_TRACE — Disables tracing and resets trace state for the session, equivalent to applying
TRACE_STOP. - PAUSE_PLSQL_TRACE — Suspends tracing without discarding accumulated trace output (
TRACE_PAUSE). - RESUME_PLSQL_TRACE — Re-enables a paused trace (
TRACE_RESUME). - LIMIT_PLSQL_TRACE — Caps the number of trace records retained, so tracing can be run up to the point of a problem without flooding storage; overrides the default limit otherwise derived from event 10940 (
TRACE_LIMIT). - COMMENT_PLSQL_TRACE — Inserts a caller-supplied annotation into the trace stream to delimit logical phases of execution.
- INTERNAL_VERSION_CHECK and PLSQL_TRACE_VERSION — Internal consistency and version-identification routines used by the package itself.
Tables Accessed
The ETRM metadata records no tables referenced through APPS synonyms, and the package is not referenced by other packages. The trace output itself is written to internal fixed tables (the SYS.PLSQL_TRACE family, historically viewed through SYS.PLSQL_TRACE_RUNS and related views), which are session-scoped diagnostics rather than application data. Consequently, invoking DBMS_TRACE does not read or modify EBS business tables.
Usage Notes
DBMS_TRACE is typically invoked from SQL*Plus or another DBA session by first enabling the feature at instance level, then calling SET_PLSQL_TRACE in the target session, executing the EBS transaction under investigation (a form, an API call, or a concurrent program), and finally calling CLEAR_PLSQL_TRACE. Querying results requires the run number returned by GET_PLSQL_TRACE_RUNNUMBER. It is a diagnostic-only utility: it should not be embedded in production business logic, and a corresponding DBMS_TRACE call should only be added to custom code when PL/SQL-level tracing is deliberately required, since the alternative for SQL-level diagnosis remains the standard SQL trace and TKPROF workflow. In all cases, tracing must be removed or disabled once the investigation closes to avoid unnecessary overhead.
-
PACKAGE: SYS.DBMS_TRACE
12.2.2
-
PACKAGE: SYS.DBMS_TRACE
12.1.1