0

In our application (ADF), app team is calling a procedure using dblink. In this procedure another procedure is being called which is in a pacakge. It works fine but some times it gives an error

ORA-06508: PL/SQL: could not find program unit being called

When I checked in remote db, I found that the status of that object is VALID.

When i restart the application server it works again. Every time i need to restart the application server (Weblogic).

I am not able to find what is the main cause of this issue. Why this is happening again and again after some days. Please help.

Thanks!

SKG
  • 164
  • 1
  • 2
  • 19
  • Have a look on `DBA_OBJECTS` on the remote DB and check `CREATED, LAST_DDL_TIME` to see if the package was updated. Check [this](https://stackoverflow.com/questions/19376440/ora-06508-pl-sql-could-not-find-program-unit-being-called) answer. – Marmite Bomber Nov 26 '18 at 14:40
  • Hi Marmite, I have checked there is nothing changed in package and procedure. I have also checked in DBA_OBJECTS, status is VALID, CREATED, LAST_DDL_TIME is same. – SKG Nov 26 '18 at 14:49
  • Try to get the full error stack. If you see `ORA-04068: existing state of packages has been discarded` **this** ist the error you should investigate... – Marmite Bomber Nov 26 '18 at 15:13

1 Answers1

0

I think your trouble became when someone compile one of package in stack. You can try to make hierarchy select query in dba_dependencies to check it.

About rebooting of server i think that it is because of in code from outside of db-link has a rollback when it calls. Till they don't reset package of states it error will repeat every time after first error. There is two ways to solve it (my opinion):
1. Catch exception with code ORA-06508
2. Wrap function/procedure of especial pragma which allow to ignore check of package states.