PLS-00905: object APPS.APPS is Invalid

Today development team has reported an issue that when they are trying to compile any package which have apps.<> schema reference thrown an error:

Troubleshoot :

1. Package code I have compiled successfully in other instances like dev2, however got the error in dev1 instance. If we remove schema reference (apps) then it’s compiling from dev1 also but as per coding standard it has good practice to use apps.<>. This show that there are some issue on dev1 DB.

Error on Dev1:
ORA-06550: line 7, column 3:
PLS-00905: object APPS.APPS is invalid
ORA-06550: line 7, column 3:
PL/SQL: Statement ignore.
 
2. Now we should make sure that we have created the package in the right place.

set linesize 90
column owner       format a20
column object_name format a30
column object_type format a20

show user
select owner, object_name, object_type
  from dba_objects
 where object_name='LPW_PO_APPROVAL'
 order by 1,2,3;

 It looks good:

owner            object_name                     object_type
APPS            LPW_PO_APPROVAL    PACKAGE
APPS            LPW_PO_APPROVAL    PACKAGE BODY
ARCHIVE    LPW_PO_APPROVAL    SYNONYM
MERGE        LPW_PO_APPROVAL    SYNONYM

if it is in different schema then connect to sys user and provide 
grant select on <schema>.<packagename> to apps;
and then try. But this is not my case.

3. I have checked the compiler log again and found APPS.APPS that means some developer mistakenly crated the apps name package on apps schema. That may be our case.
Now check :

select owner, object_name, object_type
  from dba_objects
 where OBJECT_NAME='APPS'
 order by 1,2,3;

ohh Great i found one object created with name apps.

now we should drop this :

drop package apps;

4. Try compiling the package in dev1 instance again. This time we had resolved the issue.

Package has been compiled successfully. Hurry  We have resolved the issue.




Comments

Popular posts from this blog

Workflow Agent Listener Service WF_DEFERRED + Business Event not processing

Output Post Processor - EBS 12.2.4 Troubleshoot

How to Diagnose Workflow Notification Mailer Issue