Within a Oracle PL/SQL, it is possible to write debugging and other information messages with a statement such as:
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.
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.
Before you can use the dbms_output feature of Oracle, you need to enable this for your Oracle session. This is done with:
and disabled with
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.
This window show the dbms_output messages generated during your Oracle session.
You can obtain a degree of formatting by placing a chr(10) character at the end of each message - eg.
dbms_output.put('message' || chr(10)). When displaying the output, select the variable row height option to see the text in multiple lines.
Note that AQT can only run one query at once. When the Auto Refresh feature is enabled, and you are running queries and using other windows within AQT, you may periodically get the message Cannot process SQL as a query is already in process.