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

Execute SQL Statements within PL/SQL

You can easily execute a SQL statement embedded within PL/SQL. Toad extracts the SQL statement and adjusts the syntax as necessary. Any identifier which is not a column of a referenced object is treated as a bind variable. If the identifier is a reference to a PL/SQL constant, the bind variable value defaults to the constant value.

To execute a SQL statement within PL/SQL

Place the cursor in the statement and press SHIFT+F9. A new window displays with the extracted SQL statement.

 

Execute PL/SQL

You can execute stored procedures, functions, packages or triggers in the Schema Browser or in the Editor.

To execute stored code from the Schema Browser

  1. Click image\Toad0015.gif on the Standard toolbar to open the Schema Browser.
  2. Select a PL/SQL object then click .

To execute stored code from the Editor

  1. Click on the Standard toolbar to open the Editor.
  2. Open a PL/SQL object.
  3. Click or on the toolbar.

 

Debug

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.

 

About Debugging

You can debug PL/SQL and SQL scripts in Toad.

Notes:

  • There are minimum Oracle database requirements for using this feature. Minimum Oracle Requirements for Debugging
  • The debugger is not designed to work with word-wrapped lines, since the Editor will then have a different set of line numbers than what is stored in Oracle. Toad provides a warning message about this if you open the procedure Editor while word-wrapping is enabled. To disable word-wrap, select View | Toad Options | Editor | Behavior and clear Word wrap.
  • To avoid modifications to code that is being debugged, Toad does not allow you to run a query while you are running a debugging session.

Types of Debugging

Toad provides the following debug features:

Debug type Description
DBMS Debugger

Debugs PL/SQL. Using the Debugger, you can set breakpoints, watches, and see call stacks. In addition, you can view DBMS output.

Note: When using the PL/SQL Debugger and connecting to a RAC instance, you must have the TNSNAMES entry for the instance with the server directed the use connection or session here. Or, you must connect directly to an instance of the cluster without letting the server assign an instance.

Script Debugger

Debugs SQL scripts. You can set breakpoints, run to cursor, step over, trace into, and halt execution of your scripts.

Attach External Session External debugging allows you to debug PL/SQL that is run from an external session, such as another Toad window, SQL*Plus, or any other development tool which calls Oracle stored procedures.

Debugging in Toad requires you to select one type of debugging at a time for all database instances open per instance of Toad. For example, if you have three database connections in one instance of Toad, they must all be in the same debugging state. If you then opened another instance of Toad, with the same or different connections, they could be in a different debugging state.

Compile with Debug Information

To use the debugger fully with PL/SQL or Java packages, you need to compile your object with debug information. Start Debugging

In addition, if you are debugging an object that has dependent objects, you cannot step into the dependents unless they, too, are compiled with debug information. Handle Dependencies and References

Compile without Debug Information

To reduce the size of your code when it is ready for production, you should compile without debug information. Prepare PL/SQL Code for Production.

Get more information on Debugging

  • Toad's online help includes tutorials on how to debug. See Debugging a Procedure or Function Tutorial in the online help for more information.
  • See the Debug section of the Table of Contents in the online help for additional topics on debugging.

 

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating