3.8 Managing Packages
A package is a database object that groups logically related PL/SQL types, items, functions and procedures. Use Object Browser to view, create, edit, download, and drop packages.
Packages usually have two parts, a specification and a body. The specification is the interface to your application. The body implements the specification.
- Creating a Package
Create packages using Object Browser. - Viewing a Package
Select a package from the Object Tree and access tabs in the Object Detail View. - Editing a Package Manually
Select a package from the Object Tree and edit the code in the Object Detail View. - Compiling a Package
Select a package from the Object Tree and click Save and Compile. - Downloading a Package
Select a package from the Object Tree and click Download to save it as a file. - Dropping a Package While Viewing the Specification
Select a package from the Object Tree and click Drop on the Specification tab. - Dropping a Package While Viewing the Body
Select a package from the Object Tree and click Drop on the Body tab.
See Also:
PL/SQL Packages and PL/SQL Subprograms in Oracle Database PL/SQL Language Reference for additional information on PL/SQL packages.
Parent topic: Managing Database Objects with Object Browser
3.8.1 Creating a Package
Create packages using Object Browser.
To create a package:
Parent topic: Managing Packages
3.8.2 Viewing a Package
Select a package from the Object Tree and access tabs in the Object Detail View.
To view a package:
Parent topic: Managing Packages
3.8.3 Editing a Package Manually
Select a package from the Object Tree and edit the code in the Object Detail View.
When you edit a package, you can edit the code manually, perform a search and replace, and then compile the package.
Parent topic: Managing Packages
3.8.4 Compiling a Package
Select a package from the Object Tree and click Save and Compile.
If you edit and make changes to a package, you must compile to save your changes.
The Save and Compile action is available on both the Specification and Body tabs in Object Detail View.
To compile a package:
Parent topic: Managing Packages
3.8.5 Downloading a Package
Select a package from the Object Tree and click Download to save it as a file.
Both the Specification and Body tabs feature a fully functional Code Editor. To download the displayed source code in either tab, click Download.
To download a package:
Parent topic: Managing Packages
3.8.6 Dropping a Package While Viewing the Specification
Select a package from the Object Tree and click Drop on the Specification tab.
The package specification defines the interface to your application and delcares the elements that can be referenced outside of the package.
To drop a package specification:
Parent topic: Managing Packages
3.8.7 Dropping a Package While Viewing the Body
Select a package from the Object Tree and click Drop on the Body tab.
The package body is a named collection of functions, procedures, variables, cursors, user-defined types, and records that are referenced using the package name.
To drop a package while viewing the Body:
Parent topic: Managing Packages