Search Results get_lines




Overview

SYS.DBMS_OUTPUT is the Oracle-supplied PL/SQL package that provides the server-side buffering and client-side retrieval mechanism used throughout Oracle E-Business Suite for diagnostic messaging, debugging, and lightweight report output. In the EBS 12.1.1 and 12.2.2 environments it is shipped under the SYS schema as an AUTHID DEFINER package and is classified in the ETRM repository as an OTHER API rather than a business API. Its role within EBS is infrastructural: it allows PL/SQL triggers, stored procedures, and anonymous blocks to emit textual messages into a session buffer without requiring a database table or file to be written. Those messages are subsequently retrieved by the client tool, typically SQL*Plus or SQL*DBA, which is the only party able to display them. The package is therefore the standard vehicle for temporary, session-scoped output rather than for persistent or business-critical data.

Key Procedures and Functions

The ETRM metadata documents eight callable units in this package. Their purposes are as follows:

  • ENABLE — Activates the package for the current session and, optionally, sets the buffer size. Until ENABLE is called, output calls are effectively inert.
  • DISABLE — Deactivates the package for the session so that subsequent output calls are ignored, releasing the buffered information.
  • PUT — Places a text fragment into the buffer without appending a line terminator, allowing callers to compose a line incrementally.
  • PUT_LINE — Places a text fragment into the buffer followed by an end-of-line marker; this is the most commonly used routine for debugging and status messages.
  • NEW_LINE — Terminates the current buffer line, equivalent to emitting a line break without additional text.
  • GET_LINE — Retrieves a single line from the buffer into an output variable and returns a status indicator. The caller repeats GET_LINE until the status is non-zero, which signals that the buffer is empty. This is the routine referenced by the user's search term.
  • GET_LINES — Retrieves an array of buffered lines in a single call. It is the higher-performance alternative to repeated GET_LINE calls.

Tables Accessed

No tables are accessed by DBMS_OUTPUT. The package maintains its information entirely in an in-memory session buffer; nothing is read from or written to database tables, and no EBS application tables or APPS synonyms are referenced. The documented buffer characteristics are a default size of 20,000 bytes, a minimum of 2,000 bytes, and a maximum of 1,000,000 bytes. Because storage is memory-resident and tied to the session, the content is lost when the session ends or when DISABLE is invoked.

Usage Notes

DBMS_OUTPUT is invoked in EBS primarily for debugging and for ad hoc reporting from server-side code. The classic pattern documented in the package header is a trigger or stored procedure issuing DBMS_OUTPUT.PUT_LINE('I got here:'||:new.col), followed by the client executing DBMS_OUTPUT.GET_LINE(:buffer, :status) after the triggering statement completes. EBS customers and developers most often encounter it through SQL*Plus with SET SERVEROUTPUT ON, which instructs the client to make GET_LINE or GET_LINES calls automatically after INSERT, UPDATE, DELETE, or anonymous PL/SQL execution. The ETRM metadata records that the package is referenced by 99 other packages, confirming its wide use as a diagnostic facility. In custom EBS code it is used to trace concurrent program execution, report parameter values, and expose internal processing state during development and troubleshooting. Because output is only captured when the client has explicitly enabled the package, DBMS_OUTPUT calls impose negligible overhead in normal runtime sessions and can safely remain in production code.