Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: [PL/SQL] Replacing single procedure in a package?
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 Mon Jan 13 2003 - 17:37:18 CST
![]() |
![]() |