When compiles an object that is referenced by many others, they stay invalidated until Oracle compile they again and sometimes it fails.

So, here’s a tip to compile several invalid packages, procedures and/or functions and fix this.

There is a command to compile all invalid objects under an user, the command is:

exec dbms_ultility.compile_schema(<USER>)

Replace  <USER> for user, or for user name where invalid objects are.

This command is slow and not compiles objects invalidated by coding error. To find which are invalid you need runs the query below:

select object_name
from all_objects
where status = 'INVALID'

Invalid objects will be listed.