Delete, Remove or Drop Oracle Stored Packages with Drop Package

Oracle Package is an object in Oracle database that allows developers and designers to group procedures and functions into common groups, typically based upon their functionality. Package can be treated as the container for functions and procedures. A package consists of two sections which is the package specification (export script file will be in .pks extension) which must be declared first and contains a definition of any objects that can be referenced from outside of the package. The other section is a package body (export SQL script file will be in .pkb extension) that contains the implementation of the objects or stored procedures within the package. With package, a procedure can be hidden inside the package by not declaring them in the package specification.

At same time you may no longer need a package, and wish to remove, delete, or drop the package from the Oracle database. To do so, simply use the DROP PACKAGE SQL command statement from SQL*Plus or Toad or other database too to drop a stored package.

Syntax of the Drop Package

DROP PACKAGE [BODY] [schema.]package_name;

The optional BODY parameter is specified when you want to drop only the body of the package. If this option is omitted, Oracle drops both the body and specification of the package. If the package to drop is in your own schema, then there is no need to specify the scheme containing the package too, else you will need to put in the appropriate schema name. Beside, you must have the DROP ANY PROCEDURE system privilege too.

Note: Do not use this statement to remove a single object from a package. Instead, re-create the package without the object using the CREATE PACKAGE and CREATE PACKAGE BODY SQL statements, or by using the SQL command with the OR REPLACE clause.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.

New Articles

Incoming Search Terms for the Article

drop package oracle - oracle drop package - how to drop a package in oracle - delete package oracle - oracle drop object - drop object in oracle - drop package in oracle - oracle suppression package - oracle delete package - view the public portions of the APPLICATION_DELETE package - oracle sql remove package - delete oracle package - drop package oracle sql - how to drop oracle package - oracle remove package - drop all procedures oracle - how to drop package in oracle - script to drop a package without dropping tables - how to delete a package in oracle - How to recover package from Oracle Toad - oracle rename package - oracle drop all packages - recreating dropped packages - remove Oracle procedures from package - application_delete package in oracle - drop oracle package - how to drop object in oracle - public portions of the APPLICATION_DELETE package - Which one of the following statements allows you to view the public portions of the APPLICATION_DELETE package? - oracle drop objects - ORACLE DELETE OBJECT - remove package oracle - drop all packages oracle - how to delete a procedure in oracle - drop objects in oracle - oracle sql drop package - syntax to drop a stored procedure in oracle - delete stored procedure oracle - Oracle nettrace packet dropping - borrar package oracle - delete a package in oracle - delete a procedure + oracle - Oracle dropping object - PROCEDURE ELIMINAR EN ORACLE - oracle drop procedure package - remover procedure+oracle - statements that allows you to view the public portions of the APPLICATION_DELETE package? - delete procedures from db oracle - drop oracle object - drop pakage oracle sql -