A script-enabled browser is required for this page to function properly.

Stored PL/SQL Editor

The Stored PL/SQL Editor enables you to create and edit stored PL/SQL program units in a database (listed under the Database Objects node in the Object Navigator).

The Stored PL/SQL Editor contains:

New

Displays the New Program Unit dialog box, where you can specify the type and name of the program unit you wish to create.

Save

Compiles the stored program unit appearing in the Source pane. Any error messages generated as a result of the compilation will appear in the scrollable Compilation messages pane.

Revert

Restores the stored program unit to its state at the last save or revert operation. If no save or revert operations have occurred, the program unit is returned to its original state.

Drop

Drops the current stored program unit from the database, with confirmation.

Close

Attempts to close the Stored PL/SQL Editor. If any changes have been made but not saved, an alert appears, prompting you to save or revert the changes or cancel the operation.

Owner

Displays the database user ID of the owner of the current program unit. Click the arrow to the right of this field to display a list of user names whose stored program units you have access to.

Name

Displays the name of the current stored program unit. Click the arrow to the right of this field to display a list of stored program units owned by the user ID shown in the Owner field. The Name list displays only the names of the stored program units to which you have been granted access.

In addition, the following elements make up the editor window:

Source pane

Area to enter and edit PL/SQL stored program unit source text.

Split bars enable you to create up to four separate views of the current program unit. Each view can be scrolled independently.

To create horizontal views in the Source pane, place the cursor on the split bar at the top of the vertical scroll bar, and double-click. This splits the Source pane horizontally into two equal-sized views. Alternatively, you can click and drag the split bar down to create the view sizes that you want.

To create vertical views, place the cursor on the split bar at the far left of the horizontal scroll bar, and double-click. This splits the Source pane vertically into two equal-sized views. Alternatively, you can click and drag the split bar to the right to create the view sizes that you want.

To resize views, click and drag the split bar that separates the views.

To remove a horizontal or vertical view, double-click the split bar that separates the views, or drag it to the edge of the pane.

To remove all four views at once, place the cursor on the intersection of the split bars and double-click, or drag it to any corner of the pane.

To select a line of code, place the cursor on the left margin and click.

Compilation Messages pane

Displays error messages generated as a result of compilation. Clicking an error message highlights it, scrolls the Source pane to the offending source statement, and positions the text cursor at the location of the error.

By default, the Compilation messages pane appears only when there are compilation error messages generated for the stored program unit. However, you can display the Compilation Messages pane at any time by moving the split bar.

Split bar

Enables you to change the relative amount of space occupied by the two panes in the Stored PL/SQL Editor. Note that by default, the Compilation messages pane is displayed only when error messages are generated during compilation.

Status line

Displays information about the current state of the stored program unit at the bottom of the editor.

See also

Creating a stored program unit