Home » SQL & PL/SQL » SQL & PL/SQL » How to (auto-)recompile dependencies?
How to (auto-)recompile dependencies? [message #35836] Thu, 18 October 2001 01:03 Go to next message
Nicola Farina
Messages: 63
Registered: October 2001
Each time I modify a package or a stored procedure
some trigger (that call the pck/sp modified) become invalid and need recompilation.
Is there any way to achieve this automatically?
I tried dbms_utility.compile_schema, but it seems not compile triggers.. or am I missing something?

Re: How to (auto-)recompile dependencies? [message #35838 is a reply to message #35836] Thu, 18 October 2001 05:57 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
save following script in .sql file and execute

set heading off
set feedback off
set term off
spool s.sql
'alter '||decode(object_type,'PACKAGE BODY','PACKAGE',object_type)||' '||object_name||' '||decode(object_type,'PACKAGE BODY','COMPILE BODY','COMPILE')||';'
FROM user_objects
WHERE object_type IN
AND status='INVALID';
spool off
set term on
set heading on
set feedback on

Previous Topic: PL/SQL-How to access another database instance?
Next Topic: dynamic pl-sql and use of &
Goto Forum:

Current Time: Sun Jun 13 13:07:57 CDT 2021