invalid Oracle objects
oracle object is marked as invalid because of a table, that has been
changed, the Oracle professional can change the object to valid
by using a SQL*Plus script. This
script will search the Oracle data dictionary for invalid objects, create a
spool file with the names of the invalid objects, then invoke a script to
re-compile all of these invalid objects.
The following script should be used whenever a change is made to an
Oracle table or index, or any other Oracle object, since the DBA must ensure that all objects are valid
Oracle8i, we now have a supported script to perform this function of
re-compiling invalid objects.
The utility is called Recompile PL/SQL, or RP for short.
The script is called utlrp.sql and is located in the $ORACLE_HOME/rdbms/admin/
directory. However, most experienced Oracle DBAs prefer a home-made script
for this purpose.
invalid PL/SQL modules get automatically recompiled on use, it is useful to
run this script ahead of time (e.g. as one of the last steps in your
migration), since this will either eliminate or minimize subsequent
latencies caused due to on-demand automatic recompilation at runtime.
You can invoke the utl_recomp package to recompile invalid objects:
EXEC UTL_RECOMP.recomp_serial('schema name');
recommends running this script towards the end of of any
' || OBJECT_TYPE || ' ' ||
|| '.' || OBJECT_NAME || ' COMPILE;'
you like Oracle tuning, you might enjoy my latest book “Oracle Tuning: The Definitive Reference” by Rampant TechPress. It’s only
$41.95(I don’t think it is right to charge a fortune for books!) and you
can buy it right now at this link: