set linesize 80;
set pagesize 10000;
set long 50;
set echo on;

/* ****************************************************** */
/*                                                        */
/* Name:    bld_complie_pak.sql                           */
/* Purpose: script to spool a listing of all commands to  */
/*          compile all non- sys/system packages          */
/* Creator: R.Kupcunas                                    */
/* Date:    1999-Nov-08                                   */
/*                                                        */
/* ****************************************************** */

set termout off;
set echo off;
set feedback off;

col dummy     noprint format a1;
col dummy2    noprint format a1;
col table_name        noprint format a1;
col command   format a70;

/* ********************************* */
/* 1. Generate drop table commands   */
/* 2. Generate create table commands */
/* ********************************* */

select distinct 'ALTER PACKAGE '||owner||'.'||name||' compile;'
from  v$db_object_cache 
where owner not in ('SYSTEM', 'SYS') 

spool bld_complie_pak.rslt
/
spool off;
set heading on;
set pagesize 100;
set termout on;

commit;










