ORA-06508: PL/SQL: could not find program unit being called [message #598465] |
Tue, 15 October 2013 03:27 |
|
njnbat
Messages: 19 Registered: September 2013
|
Junior Member |
|
|
I am using oracle 10g and toad 11.5 . i am trying to call an api from an anonymous block . If i recompile the api after adding dbms_output.put_line and then try to execute the anonymous block ,it shows error as "ORA-06508: PL/SQL: could not find program unit being called". However if i end current session and open a new session , then the anonymous block will execute with out the error. Due to this issue, i am made to reconnect the session everytime i make a change to API. Can anyone help if this issue can be resolved by making any configurations in toad or database level.
|
|
|
|
|
|
Re: ORA-06508: PL/SQL: could not find program unit being called [message #598475 is a reply to message #598465] |
Tue, 15 October 2013 04:30 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
njnbat wrote on Tue, 15 October 2013 13:57Can anyone help if this issue can be resolved by making any configurations in toad or database level.
Not necessarily it has to be DB issue. Since you are making changes to API, there is a chance that the connection property might have issues. Do you see the status of the object to be VALID or does it becomes INVALID?
|
|
|
|
|
Re: ORA-06508: PL/SQL: could not find program unit being called [message #600419 is a reply to message #600417] |
Wed, 06 November 2013 05:01 |
cookiemonster
Messages: 13920 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
This is your main problem:
njnbat wrote on Wed, 06 November 2013 10:53
ORA-04061: existing state of package body "CUSTOMER.SYS_DATA_UPDATE" has been invalidated
sys_data_update has global variables that are getting wiped when you recompile the package.
The error should go away the 2nd time you run it, not sure why it's not.
If you can get rid of the globals do so, otherwise you'll probably have to live with reconnecting whenever you change it.
|
|
|
Re: ORA-06508: PL/SQL: could not find program unit being called [message #600420 is a reply to message #600419] |
Wed, 06 November 2013 06:02 |
ThomasG
Messages: 3211 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
From where do you execute the anonymous block?
I have a somewhat "similar" problem, that one client-application uses a DB package that has global variables. My workaround is to have four "slots" (4 copies of the package, named package_a, package_b, package_c, package_d) of that package, and which package to use is configured in the application settings.
So people that log in use the package that was configured at application launch, say package_a. When I need to change something, I do the change in package_b, and then re-configure the app to use package_b. ~24 hours later all the people that used package_a have logged out and everybody uses package_b.
The next change then switches b->c, then c->d, then d->a again. (So that I can activate 3 new versions a day if need be, so far that has been enough.)
|
|
|
|
|
|
|