Saturday, March 21, 2015

Compile Invalid Objects using UTLRP.SQL and UTLIRP.SQL in R12

UTLIRP.SQL

This is a SQL script which Invalidates PL/SQL modules (procedures, functions, packages, types, triggers, views in a database). This script expects standard.sql, dbmsstdx.sql files. 

There should be no other DDL on the database while running the script.

For better performance set following parameter
set  _disable_fast_validate=TRUE in init.ora file 

connected AS SYSDBA

start database in UPGRADE mode 
SQL>STARTUP UPGRADE; or SQL>ALTER DATABASE OPEN UPGRADE;
Run script utlirp.sql 
SQL>@<ORACLE_HOME>/rdbms/admin/utlirp.sql


UTLRP.SQL

This script recompiles all existing invalid PL/SQL modules in a database. this invokes utlrcmp.sql

There should be no other DDL on the database while running the script. 

Connected AS SYSDBA

Shut down the database and restart in normal mode 

Run script utlrp.sql 
SQL>@<ORACLE_HOME>/rdbms/admin/utlrp.sql

No comments:

Post a Comment