Oracle® TimesTen In-Memory Database SQL Reference Release 11.2.1 Part Number E13070-03 |
|
|
View PDF |
The DROP PACKAGE statement removes a stored package from the database. Both the specification and the body are dropped. DROP PACKAGE BODY removes only the body of the package.
Required privilege
No privilege is required for the package owner.
DROP ANY PROCEDURE for another user's package.
SQL syntax
DROP PACKAGE [BODY] [Owner.]PackageName
Parameters
The DROP PACKAGE statement has the parameters:
Parameter | Description |
---|---|
PACKAGE [BODY] |
Specify BODY to drop only the body of the package. Omit BODY to drop both the specification and body of the package. |
[ Owner .] PackageName |
Name of the package to be dropped. |
Description
When you drop only the body of the package, TimesTen does not invalidate dependent objects. However, you cannot execute one of the procedures or stored functions declared in the package specification until you re-create the package body.
TimesTen invalidates any objects that depend on the package specification. If you subsequently reference one of these objects, then TimesTen tries to recompile the object and returns an error if you have not re-created the dropped package.
Do not use this statement to remove a single object from the package. Instead, re-create the package without the object using the CREATE PACKAGE and CREATE PACKAGE BODY statements with the OR REPLACE clause.
To use the DROP PACKAGE [BODY] statement, you must have PL/SQL enabled in your database. If you do not have PL/SQL enabled in your database, TimesTen returns an error.
Example
The following statement drops the body of package samplePackage
:
Command> DROP PACKAGE BODY SamplePackage; Package body dropped.
To drop both the specification and body of package samplepackage
:
Command> DROP PACKAGE samplepackage; Package dropped.
See also