Procedure Nodes

This section covers the following topics:

How the Procedure Nodes Work

The Procedure node is a child of the Procedures node. It represents a procedure and has a set of child parameter nodes. To perform actions on this node: right-click the node and from the menu, choose the appropriate command. To view the node's properties, select the node and/or click Properties in the node's menu.

A procedure with an error is indicated by a red x in the procedure icon.

To fix the error, open the procedure code in the PL/SQL editor, make the required changes and save the changes to the database. If the procedure has no errors, the x is removed from the procedure node icon.

Procedures that have been compiled with debug information have DBG embedded in the icon.

Menu Options

Menu Option Description

Edit

Displays the procedure code in the PL/SQL Code Editor. Alternatively, you can double-click the Procedure node to display its code in the PL/SQL Code Editor.

If the database object associated with the node was deleted from the database, you will be asked if the node needs to be deleted from the Server Explorer.If the body of the procedure is WRAPPED, a warning message will be displayed before the PL/SQL editor window is opened, with the wrapped text. When you make changes to the wrapped text and try to save the changes, you will be prompted to overwrite the wrapped text with your changes.

Query Window

Opens the Query Window so that you can execute SQL and PL/SQL queries from Visual Studio.

Compile

Performs the following actions:

  1. If the procedure is open in the PL/SQL Editor and has been changed, saves the changes to the database.

  2. Compiles the procedure.

See PL/SQL Compiler Settings Options Page for compile settings.

Compile Debug

Compiles the procedure with debug information.

This is required before PL/SQL code can be debugged. See Compiling a PL/SQL Program with Debug Information.

See PL/SQL Compiler Settings Options Page for compile settings.

Run

Executes the procedure using the Run dialog box.

Run Debug

Starts debugging the procedure and runs to the breakpoint. See Debugging a PL/SQL Program Directly.

Step Into

Begins debugging the procedure and stops at the line of code. See Debugging a PL/SQL Program Directly.

Generate Create Script

Writes the procedure definition to a .sql file.

Generate Create Script to Project

Generates the procedure definition to a .sql file and adds the .sql file to an open Oracle Database Project.

If multiple objects in Server Explorer are selected, a master SQL script is created in the Oracle Database Project Scripts folder. This master script contains calls to individual child SQL scripts (one for each schema object) generated into the various schema object folders and this master script is ordered with dependencies taken into consideration.

If there are multiple open Oracle Database projects, Visual Studio prompts you to select the project to add the script to.

This operation can also be performed by dragging and dropping the Server Explorer node(s) directly onto a database project folder.

See Managing Oracle Script Files for more information.

Note: Oracle Database Project Version 2 projects are not supported. To add scripts to this project type, use Import Schema or Add Existing Item menu items on an Oracle Database Project Version 2 project folder, or use the Schema Compare tool.

Dependencies and References

Opens the Dependencies and References Viewer for viewing the dependencies that this object has on other database schema objects.

Privileges

Opens the Grant/Revoke Privileges dialog box.

Copy

Copies the selected procedure to the clipboard for pasting to Visual Studio designers. This provides the same functionality dragging and dropping the procedure to the Visual Studio designers.

Delete

Drops the procedure.

Refresh

Updates the Procedure node and its associated parameter nodes.

If the database object associated with the node was deleted from the database, you will be asked if the node needs to be deleted from the Server Explorer.

Properties

Displays the Properties window.