Created
          April 15, 2015 01:57 
        
      - 
      
- 
        Save sandcastle/5464c73dc073b8cf0a4e to your computer and use it in GitHub Desktop. 
    Recompile all Oracle objects (requires access to dba_objects). If running as a user schema, you can use user_objects instead.
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | set heading off; | |
| set feedback off; | |
| set echo off; | |
| Set lines 999; | |
| spool run_invalid.sql | |
| select 'ALTER ' || OBJECT_TYPE || ' ' || OWNER || '.' || OBJECT_NAME || ' COMPILE;' | |
| from dba_objects | |
| where status = 'INVALID' | |
| and object_type in ('PACKAGE','FUNCTION','PROCEDURE'); | |
| spool off; | |
| set heading on; | |
| set feedback on; | |
| set echo on; | |
| @run_invalid.sql | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment