Here's one:
Change the spool path to whatever you want.
- This script will try to recompile all the objects owned by one owner.
- Enter the owner name when prompted.
- Since objects may depend on one another, rerun the script until no more
objects compile.
- Van Feb 99
set head off
set pagesize 66
set newpage 5
ACCEPT who PROMPT 'Enter the Owner of the Objects to Recompile:'
SPOOL C:\ALLDATA\TUNING\Compile_List.sql
SELECT 'ALTER ' || OBJECT_TYPE||' ' ||OWNER||'.'||OBJECT_NAME || ' COMPILE;'
FROM all_objects
WHERE object_type in ('PROCEDURE', 'PACKAGE', 'FUNCTION', 'VIEW', 'TRIGGER')
and status = 'INVALID'
and owner = UPPER('&who')
ORDER BY object_name, status ;
SELECT 'ALTER PACKAGE'||' '||OWNER||'.'||OBJECT_NAME || ' COMPILE BODY;'
FROM all_objects
WHERE object_type in ('PACKAGE BODY')
and status = 'INVALID'
and owner = UPPER('&who')
ORDER BY object_name, status ;
SPOOL OFF
@C:\ALLDATA\TUNING\COMPILE_LIST.SQL
tim_mcconechy_at_my-deja.com wrote in message <7j5ki8$c3k$1_at_nnrp1.deja.com>...
>How do I build a recompile invalid objects script???
>
>TIA
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
Received on Thu Jun 03 1999 - 19:01:39 CDT