Search notes:

ORA-06575: Package or function … is in an invalid state

create table tq84_tab (num number);
insert into tq84_tab values(42);
create or replace function tq84_fnc return number as
   ret number;
begin
   select max(num) into ret from tq84_tab;
   return ret;
end tq84_fnc;
/
drop table tq84_tab;
Error not yet recognized:
select * from user_errors where name = 'TQ84_FNC';
Only by executing the following select statement, Oracle realizes that the function has become invalid and throws ORA-06575: Package or function TQ84_FNC is in an invalid state.
select tq84_fnc from dual;
Because tq84_fnc was recompiled to be used in the select statement, an error is now recored in user_errors:
select text from user_errors where name = 'TQ84_FNC';
--
-- PL/SQL: ORA-00942: table or view does not exist
-- PL/SQL: SQL Statement ignored
--
Cleaning up
drop table tq84_tab;
drop function tq84_fnc;

See also

Other Oracle error messages such as ORA-04063: view … has errors

Index