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
Member
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?
TIA
Nicola

----------------------------------------------------------------------
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
SELECT
'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
('PACKAGE','PACKAGE BODY','VIEW','PROCEDURE','TRIGGER','FUNCTION')
AND status='INVALID';
spool off
set term on
set heading on
set feedback on
@s.sql

----------------------------------------------------------------------
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