2.12 Managing Packages
A package is a database object that groups logically related PL/SQL types, items, functions and procedures. You can create, view, edit, compile, drop, download a package, and view a report.
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 a package using Object Browser. Select the type of package you want to create. - Viewing a Package
Select a package from the Object Selection pane and view different reports about the package. - Reports for Packages
Alternative views available when viewing a package in Object Browser. - Editing a Package Manually
Select a package from the Object Selection pane and click Find or Replace. - Compiling a Package
If you edit and make changes to a view, you must compile to save your changes. - Downloading a Package
Select a package from the Object Selection pane and download a package by clicking Download Source to save the current package as a file. - Dropping a Package While Viewing Specification
Select a package from the Object Selection pane and click Drop. - Dropping a Package While Viewing the Body
Select a package from the Object Selection pane, click Body tab, and click Drop.
See Also:
-
"Using PL/SQL Packages " in Oracle Database PL/SQL Language Reference for additional information on PL/SQL packages.
-
"Using PL/SQL Subprograms" in Oracle Database PL/SQL Language Reference for information on PL/SQL subprograms
Parent topic: Managing Database Objects with Object Browser
2.12.1 Creating a Package
Create a package using Object Browser. Select the type of package you want to create.
To create a package:
Parent topic: Managing Packages
2.12.2 Viewing a Package
Select a package from the Object Selection pane and view different reports about the package.
When you access a package in Object Browser the specification appears.
To view a specification:
Parent topic: Managing Packages
2.12.3 Reports for Packages
Alternative views available when viewing a package in Object Browser.
Table 2-7 describes all available reports for packages.
Table 2-7 Available Reports for Packages
Parent topic: Managing Packages
2.12.4 Editing a Package Manually
Select a package from the Object Selection pane and click Find or Replace.
When you edit a package, you can edit the code manually, perform a search and replace, and compile the package.
Parent topic: Managing Packages
2.12.5 Compiling a Package
If you edit and make changes to a view, you must compile to save your changes.
There is no save function because this is just a view of the object within the database.
To compile a package:
Parent topic: Managing Packages
2.12.6 Downloading a Package
Select a package from the Object Selection pane and download a package by clicking Download Source to save the current package as a file.
To download a package:
Parent topic: Managing Packages
2.12.7 Dropping a Package While Viewing Specification
Select a package from the Object Selection pane and click Drop.
To drop a package while viewing the Specification:
Parent topic: Managing Packages
2.12.8 Dropping a Package While Viewing the Body
Select a package from the Object Selection pane, click Body tab, and click Drop.
To drop a package while viewing the Body:
Parent topic: Managing Packages