sqlplus -s / as sysdba << EOF
set heading off;
set verify off;
set feedback off;
set trims on;
spool compile_objects.sql
prompt set echo on
select 'Alter '||rtrim(object_type, ' BODY')||' '||owner||'.'||object_name
||' compile'||decode(object_type, 'PACKAGE BODY', ' BODY', NULL)||chr(10)||'/'
from dba_objects
where object_type in ('PROCEDURE', 'FUNCTION', 'PACKAGE',
'PACKAGE BODY', 'TRIGGER', 'VIEW','MATERIALIZED VIEW')
and status = 'INVALID'
and owner='APPS'
set heading off;
set verify off;
set feedback off;
set trims on;
spool compile_objects.sql
prompt set echo on
select 'Alter '||rtrim(object_type, ' BODY')||' '||owner||'.'||object_name
||' compile'||decode(object_type, 'PACKAGE BODY', ' BODY', NULL)||chr(10)||'/'
from dba_objects
where object_type in ('PROCEDURE', 'FUNCTION', 'PACKAGE',
'PACKAGE BODY', 'TRIGGER', 'VIEW','MATERIALIZED VIEW')
and status = 'INVALID'
and owner='APPS'
No comments:
Post a Comment