Tuesday, June 4, 2013

Recompiles/Invalidates all PL/SQL code inside Oracle Db

from sys user we can below script for Recompiles/Invalidates all PL/SQL Code , this will very help full ,

Instance has to be started in upgrade mode and Oracle built-in PLSQL code has to be revalidated. As "startup upgrade" hangs too, we have no option other than using "alter database open migrate" command which achieves the same target databse state as follows:


# sqlplus "/as sysdba"
shutdown immediate
startup mount
alter database open migrate;
@$ORACLE_HOME/admin/utlirp.sql   ---- this script invalidates all PL/SQL code
@$ORACLE_HOME/admin/utlrp.sql    ---- this script recompiles everything again
shutdown immediate
startup

1 comment: