Home » SQL & PL/SQL » SQL & PL/SQL » Recompiling invalid packages
Recompiling invalid packages [message #38853] Tue, 21 May 2002 05:50 Go to next message
Xenofon Grigoriadis
Messages: 33
Registered: May 2002
Member
Hi everybody!

I have some problems with wright understanding of Oracle internal handling of dependant objects.

My aim is to find a way to automatically recompile all dependant objects, wenn installing patches of say packages or other objects.

What about the ORA-4068 error? I often get it after having installed new versions of packages, but I could not really reproduce the error. When I tried to use a function which was invalid, then the function seemed to be recompiled and used directly, so that I did not get the 4068 at all.

Another thing is, although the oracle documentation says each session has its own instance of the package, it seemed to me, that recompiling a package in a session affects and helps all across other open sessions as well.

So what is right? Oracle documentation or my results?

Thank you in advance,

Xenofon Grigoriadis
Bonn, Germany
Re: Recompiling invalid packages [message #38859 is a reply to message #38853] Tue, 21 May 2002 21:59 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Hi,
try DBMS_UTILITY.COMPILE_SCHEMA. It is an Oracle-provided procedure.

MHE
Does recompiling invalid packages affect help with already open sessions? [message #38860 is a reply to message #38859] Wed, 22 May 2002 01:39 Go to previous messageGo to next message
Xenofon Grigoriadis
Messages: 33
Registered: May 2002
Member
Perhaps you misunderstand me.

I dont't have any problems with recompiling packages.

My question is, does recompiling an invalid package affect already open session, when next time trying to use the package?

What is the real cause of the ORA-4068?
Re: Does recompiling invalid packages affect help with already open sessions? [message #38861 is a reply to message #38859] Wed, 22 May 2002 01:51 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
When you recompile only the body, other sessions won't be affected, since the timestamp of the specification hasn't changed. If the timestamp of the specification is changed (i.e. after recompilation) other packages will encounter the ORA-4068.

MHE
Previous Topic: writing to a flat file
Next Topic: Stored Procedure Tuning.
Goto Forum:
  


Current Time: Fri May 10 12:52:33 CDT 2024