지금 지원 담당자와 채팅
지원 담당자와 채팅

Toad for Oracle 14.2 - Getting Started Guide

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

Generate DBMS Output

Oracle provides a package, called DBMS_OUTPUT, which is specifically designed with functions for debugging PL/SQL code. It uses a buffer that your PL/SQL code writes into, and then a separate process queries the buffer out and displays the contents.

The Editor has a Right-Click menu option that will generate a DBMS_OUTPUT statement for a highlighted variable. The same menu has an option to create a blank DBMS_OUTPUT statement.

To generate an output line from a variable

  1. Highlight the variable in the Editor.

    Right-click and select Output Statements | Make Output Statement.

    Note: The statement is created on the clipboard.

  2. Paste the statement in your code where you want it.

To generate a blank output statement

  1. In the Editor, right click and select Output Statements | Blank Output Statement.
  2. Paste the statement in your code.

To view DBMS Output

On the main toolbar, select View | DBMS Output.

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

 

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.

 

관련 문서

The document was helpful.

평가 결과 선택

I easily found the information I needed.

평가 결과 선택