Previous Topic

Next Topic

Book Contents

Book Index

Display Oracle DBMS_OUTPUT

Within a Oracle PL/SQL, it is possible to write debugging and other information messages with a statement such as:

dbms_output.put('message')

AQT provides a tool to display these dbms_output messages. This tool can be invoked from either the Database Explorer window or the Run SQL window with Tools > Oracle DBMS Output.

AQT will open only one DBMS Output window for each Oracle database.

AQT Function

In order to use this feature, AQT needs to create a function on your Oracle database. This function enables the dbms_output messages to be returned as a result-set - this is needed so that AQT can read these messages through the ODBC interface used by AQT.

When you first use the DBMS Output tool, AQT will prompt you to:

This function needs to be created on every Oracle database you use this tool with. Once you have created / selected the function, AQT remembers this name so won't prompt you again for this.

AQT doesn't remember different names for different databases; it is recommended that you use the same name for all Oracle databases.

Other notes:

Enabling DBMS_OUTPUT

Before you can use the dbms_output feature of Oracle, you need to enable this for your Oracle session. This is done with:

call dbms_output.enable()

and disabled with

call dbms_output.disable()

These statements will be done automatically by AQT when you start/stop the DBMS Output window. Eg.

So, before you run some PL/SQL (or Stored Procedure) which generates some dbms_output messages, you should either open the DBMS Output window, or manually run the dbms_output.enable command.

Using the DBMS Output window

This window show the dbms_output messages generated during your Oracle session.