REM Recompile any invalid objects after applying patches. You can do this from adadmin, or use this script REM from Metalink document REL11i ADPATCH BASICS, Doc ID: 181665.1: REM Following are examples of the recompile scripts and instructions on implementing REM Recompile: REM Instructions REM 1. create recompile and recompile.sql scripts from the above examples. REM 2. Modify recompile file, putting the correct address on your system where you are storing recompile.sql REM 3. chmod 777 recompile (or make recompile an executable file) REM 4. run recompile REM $ recompile [return] REM sqlplus system/manager REM rm -Rf /tmp/recompile_objects.sql REM recompile_objects.sql column owner format a1 noprint column object_name format a1 noprint column order_col format a1 noprint column cmd format a132 set heading off set pagesize 0 set linesize 180 set echo off set feedback off spool recompile_objects_sql.sql select 'set echo on' from dual; select 'spool recompile_objects.lis' from dual; select distinct 'alter session set current_schema=' || owner || ';' cmd, owner, 1 order_col, NULL object_name from dba_objects where status = 'INVALID' and object_type in ('PACKAGE','PACKAGE BODY','VIEW','PROCEDURE', 'FUNCTION','TRIGGER','TYPE','TYPE BODY','INDEXTYPE', 'JAVA CLASS') union select 'ALTER ' || decode(object_type, 'PACKAGE BODY', 'PACKAGE', 'TYPE BODY', 'TYPE', object_type) || ' ' || owner || '.' || '"' || object_name || '"' || ' COMPILE' || decode(object_type, 'PACKAGE BODY', ' BODY', 'TYPE BODY', ' BODY', '') || ';' cmd, owner,2 order_col, object_name from dba_objects outer where status = 'INVALID' and object_type in ('PACKAGE','PACKAGE BODY','VIEW','PROCEDURE', 'FUNCTION','TRIGGER','TYPE','TYPE BODY','INDEXTYPE', 'JAVA CLASS') and (object_type <> 'PACKAGE BODY' or not exists (select null from dba_objects where owner = outer.owner and object_name = outer.object_name and object_type = 'PACKAGE' and status = 'INVALID')) and (object_type <> 'TYPE BODY' or not exists (select null from dba_objects where owner = outer.owner and object_name = outer.object_name and object_type = 'TYPE' and status = 'INVALID')) order by 2,3,4 / select 'exit;' from dual; spool off; set heading on set feedback on set pagesize 9999 set linesize 80 @recompile_objects_sql.sql