Chat now with support
Chat with Support

Toad for Oracle 12.12 - Getting Started Guide

Table of Contents Welcome to Toad Toad Resources Required Privileges Create and Manage Database Connections Editor Basics Schema Browser Basics Data Grid Basics Work with Data Work with Database Objects Work with Code
Write Statements and Scripts Work with the Query Builder Execute Statements and Scripts Save Statements (SQL Recall) Work with PL/SQL Objects Debug Analyze Code Optimize SQL
Customize your Toad Environment Use Other Quest Software Products with Toad

Prepare PL/SQL Code for Production

When you have finished debugging your PL/SQL code, the debug symbol tables are left in the code. This makes your code larger and can slow performance. To eliminate this issue, compile the code and its dependencies and references one last time without debug information.

To compile without debug information

  1. On the main toolbar, turn the debug toggle button to the off position (not depressed).
  2. Compile the code. This recompiles without the debug symbol tables.


View Debug Results

Toad sends your PL/SQL debugger output results to the PL/SQL Results window. This window is located on a tab in the output area of the Editor.

When the PL/SQL execution terminates, the PL/SQL Results window displays the input and output of the code, in a format similar to that shown in the Set Parameters window (parameter name, data type, input, and output). If there is a cursor result, you can view the data stored in each REF CURSOR that is returned via out parameters or as a function result.

From this window, you can create and run unit tests and also open Code Tester for Oracle. Create and Run Unit Tests from the debugger

The PL/SQL Results window has the following limitations:

  • Works only with strongly-typed REF CURSORs.
  • Works only when the REF CURSOR type is declared in a package belonging to the currently logged-in user.

To view cursor data

  • Before you execute the PL/SQL, select Fetch cursor data in the Set Parameters window. Set Parameters
  • After you execute the PL/SQL, double-click (CURSOR) in the PL/SQL Results window.

To access the PL/SQL Results tab

If you cannot see the PL/SQL Results window at the bottom of the Editor, try one the following:

  • In the Editor toolbar, select PL/SQL Results from the Desktop drop-down menu.
  • Right-click in the Editor window and then select Desktop | PL/SQL Results.
  • If PL/SQL Results is already active but still not visible, then you may need to resize or reposition the docked windows to make it visible.


Use DBMS Output

Toad provides an intuitive and efficient way to write, run, and test your SQL and PL/SQL code. Toad supports efficient code management for a single developer or a whole team of developers.


Enable DBMS Output

Toad uses the Oracle-provided DBMS_OUTPUT package, which contains functions for debugging PL/SQL code. When enabled, it uses a buffer that your PL/SQL code writes into and then a separate process queries the buffer out and displays the contents.

When you are running debugging in the Editor and DBMS output is enabled, a DBMS Output tab automatically displays the results of DBMS_OUTPUT.PUT_LINE() statements in the Editor. You can also edit the DBMS Output content to make comments, delete specific lines of output, and so on. The standard copy, cut, and paste keys also work in the DBMS Output box.

To view DBMS Output in the Editor, you must enable DBMS Output before executing PL/SQL. The output displays after the procedure has completed execution, not while you are stepping through the code. In nested procedure calls, all procedures must have run to completion before any DBMS Output content is displayed.

Note: Output only displays after the procedure has completed execution, not while you are single stepping through the code. In the case of nested procedure calls, all procedures must have run to completion before any DBMS Output content is displayed.

To enable or disable DBMS output

At the top of the DBMS Output window, click the Enable/Disable toggle button.

To generate DBMS Output

Generate DBMS Output

To automatically insert DBMS_OUTPUT statements

You can use Toad's Auto Debugger feature to automatically insert DBMS_OUTPUT statements where applicable and remove them when done. See Automatically Insert DBMS_OUTPUT Statements (Auto Debugger) in the online help for more information.


If you do not see DBMS Output, try the following suggestions:

  • Right-click the lower pane and select Desktop | DBMS Output.
  • Make sure the Toggle Output On/Off button is on () in the DBMS Output tab.
  • Then, set the interval in the Polling Frequency box. If the toggle is on, Toad periodically scans for and displays DBMS Output content.
  • Contact your Oracle DBA to make sure the DBMS_OUTPUT package is enabled on your database.


Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating