DBMS_OUTPUT package

The DBMS_OUTPUT package provides a set of procedures for putting messages (lines of text) in a message buffer and getting messages from the message buffer. These procedures are useful during application debugging when you need to write messages to standard output.

The DBMS_OUTPUT package includes the following system-defined routines.

Table 1. System-defined routines available in the DBMS_OUTPUT package
Routine name Description
DISABLE procedure Disables the message buffer.
ENABLE procedure Enables the message buffer.
GET_LINE procedure Gets a line of text from the message buffer.
GET_LINES procedure Gets one or more lines of text from the message buffer and places the text into a collection.
NEW_LINE procedure Puts an end-of-line character sequence in the message buffer.
PUT procedure Puts a string that includes no end-of-line character sequence in the message buffer.
PUT_LINE procedure Puts a single line that includes an end-of-line character sequence in the message buffer.

Use the command line processor (CLP) command SET SERVEROUTPUT ON to redirect the output to standard output.

DISABLE and ENABLE procedures are not supported inside autonomous procedures.

An autonomous procedure is a procedure that, when called, executes inside a new transaction independent of the original transaction.