Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: ALTER PROCEDURE my_proc COMPILE;

Re: ALTER PROCEDURE my_proc COMPILE;

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Wed, 09 Feb 2000 18:21:10 +0800
Message-ID: <38A13F96.5973@yahoo.com>


Mark Framness wrote:
>
> Greetings All
>
> On an OCP practice exam question (for the Develop PL/SQL Program Units
> exam) there is a question that has me confused.
>
> Proc A calls proc B. Both procs are invalid. What command do you use
> to recompile both procs?
>
> The answer given is: ALTER PROCEDURE a COMPILE;
>
> The problem I have is that I thought the statement *ONLY* compiles the
> proc specified. Does it also compile referred procs in the proper
> order? A colleague thinks it is a trick question of sorts.
>
> My thinking is that proc B is invalid and proc A invalidates when a
> tries to call B. So to fix this situation we need to first recompile B
> than we can go ahead and recompile A.
>
> What is going on with that answer? What am I missing?
>
> Thanks
>
> --
> From: Mark Framness
> http://netnet.net/~farmer/index.html
> All standard disclaimers apply anyone who say otherwise is itching for a
> fight!
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

When Oracle encounter a proc (called from another proc) it will attempt to silently recompile it. Thus recompiling 'a' is sufficient, since when it calls 'b' (if it is invalid) it will be recompiled.

HTH
--



Connor McDonald
connor_mcdonald_at_yahoo.com

There are 3,434,679 oracle websites around the world. Now there is one more... http://www.oracledba.co.uk Received on Wed Feb 09 2000 - 04:21:10 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US