To create a stored (server-side) program unit:
In the Object Navigator, double-click the Database Objects node. If this node is disabled, the Connect dialog box displays so you can establish a database connection.
Expand the subnode that corresponds to the database user name you used to log in to the database to show the PL/SQL Stored Program Units node.
Click the PL/SQL Stored Program Units
node, then click
in the toolbar.
In the dialog box, type a name for the program unit in the Name text box.
If your program unit is not a procedure (a PL/SQL subprogram that performs a specified sequence of actions), click one of the following:
Function (a PL/SQL subprogram that performs a specified sequence of actions, and then returns a value)
Package Spec (datatypes and subprograms that can be referenced by other program units)
Package Body (implementation of the package, which may include private subprograms and datatypes; optional if the package consists only of declarations)
Type Spec (declares the name, variables (attributes) and member subprograms (methods) for an object type or collection type)
Type Body (implementation of the member methods (functions and procedures) defined in the type specification for an object type. For each method specified in an object type, there must be a corresponding method body)
Note: If the radio button is not selected when you click, try clicking a different radio button, then click the desired Type again.
Click OK.
In the Stored PL/SQL Editor, select a database owner name from the Owner list to indicate where the program unit will be stored in the database, then define the PL/SQL for the stored program unit.
Next step
Moving a program unit between client and server
Copyright © 1984, 2005, Oracle. All rights reserved.