Re: [PL/SQL] Replacing single procedure in a package?

From: Martin Doherty <martin.doherty_at_nospam.com>
Date: Mon, 13 Jan 2003 15:37:18 -0800
Message-ID: <iaIU9.17$G87.122_at_news.oracle.com>


Every package consists of one or two parts: a header/specification (CREATE OR REPLACE PACKAGE) and an optional body (CREATE OR REPLACE PACKAGE BODY). If the package header only declares data (variables, constants, types) then no body is needed. If the package header declares any procedures or functions then a body is needed to define the code for those program units.

Depending on the change you need to make, you may be able to only replace the body. You only need to replace the header if the procedure name or parameters have changed in any way (e.g. if an IN parameter needs to become IN OUT). It is highly advantageous to avoid replacing the header if possible, because all dependencies from other packages or objects to your package are based on your package header. If you only replace the body, then you do not invalidate all of the dependent objects that refer to your package.

Martin Doherty

Bogien wrote:

>Hello,
>
>I want to replace a single procedure in a package. Is it necessary
>to rewrite/replace the whole package?
>
>I've tried:
>"create or replace procedure package_name.procedure_name"
>...unfortunately, this did not work.
>
>Thanks!
>
>
Received on Tue Jan 14 2003 - 00:37:18 CET

Original text of this message