<< Click to Display Table of Contents >>

Capturing server output

Top Previous Next

Oracle is shipped with the DBMS_OUTPUT package. This provides an easy way to generate text output from your PL/SQL code. Although this output is normally disabled in production, you can display it within development systems. For example, Oracle SQL*Plus displays these outputs after you SET SERVEROUTPUT ON.

KeepTool captures this information, too. You can check the View | DbmsOutput window main menu item to toggle visibility of the DBMS_OUTPUT window. You can capture server output from any PL/SQL code that you run within Hora, for example:

From an anonymous PL/SQL block or stored procedure that you run in the SQL Scratchpad. For KeepTool Light, this is the only way to send output to the window.

From the automatically generated PL/SQL call interface (Hora only).

From the standalone SQL Editor (Hora only).

From any trigger that fires after inserting, updating or deleting data. (Hora only).




In addition, this window is used to display result sets from SELECT statements executed when using the Execute Script command or button. The results will then be in the form of text that you can copy and paste elsewhere.

You can drag the DBMS_OUTPUT window away from the main form if you want to make it a "flying window," as in the above illustration. When you drag it over the bottom of the main window, it will dock to the bottom of the window.

There are six buttons at the top of the window:

The Get dbms_output button fetches the server output and appends it to existing lines in the window.

The Discard dbms_output button clears the output buffer on the server without fetching the output.

The Clear window button removes all lines from the window.

The Save to file.. button lets you save the contents of the window to a file.

The Copy to clipboard button saves selected text to the clipboard.

The Select all button selects the entire contents of the window for a subsequent copy.

You can change the size of the server output buffer using the SQL Page tab of the Extras | Settings menu item.