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

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

Tried to Execute a program which is not present or invalid in the database objects. We need to check the program name which called and tried to find the solution.

1 Step: Check the existence of the package or procedure or function.
Is it present in the database and in which status it is in database.

1. Check the existence of the object.

select object_name, status from dba_objects where object_name = 'PROGRAM';

2. Check the packages or procedure is in invalid status.

Select object_name,owner,object_status from dba_objects where object_name='PROGRAM';

Select object_name,owner,object_status from dba_objects where object_status='INVALID';

3. Compile the object which is invalid with help of following scripts:

Set heading off;
set feedback off;
set echo off;
Set lines 999;
Spool Procdure_invalid.sql
select
'ALTER ' || OBJECT_TYPE || ' ' ||
OWNER || '.' || OBJECT_NAME || ' COMPILE;'
from
dba_objects
where
status = 'INVALID'
and
object_type in ('PACKAGE','FUNCTION','PROCEDURE')
;

4. If you can also run utlrp.sql utility for compile all invalid objects present in database.

@ORACLE_HOME\rdbms\admin\utlrp.sql

5.  If issue still present connect with development team to rectify the error in procedure and function.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s