postDBCreation.sql

OCPdba.Net

connect SYS/&&sysPassword as SYSDBA
set echo on

spool /xfer/oracle/OraHome10g/assistants/dbca/logs/postDBCreation.log
connect SYS/&&sysPassword as SYSDBA

set echo on

--
-- Create an spfile from the current pfile
--
create spfile='/xfer/oracle/OraHome10g/dbs/spfileILMG1.ora' FROM pfile='/u01/oracle/10g/ILMG1/scripts/init.ora';

--
-- Shutdown and restart the database, using the spfile
--
shutdown immediate;

connect SYS/&&sysPassword as SYSDBA
startup ;

--
-- Recompile all invalid PL/SQL modules, Java Classes, Indextypes and Operators sequentially
--
select 'utl_recomp_begin: ' || to_char(sysdate, 'HH:MI:SS') from dual;
execute utl_recomp.recomp_serial();
select 'utl_recomp_end: ' || to_char(sysdate, 'HH:MI:SS') from dual;


spool /xfer/oracle/OraHome10g/assistants/dbca/logs/postDBCreation.log
exit;

OCPdba.Net