Saturday, August 23, 2014

Script to Compile Invalid Objects in a Schema


This procedure recompile invalid objects in a given schema or all invalid objects in the database.

Parameter :
 schema     (IN) - Schema in which to recompile invalid objects  If NULL, all invalid objects in the database are recompiled.

BEGIN
UTL_RECOMP.recomp_serial(p_schema_name);
END;

DESCRIPTION:
This procedure is the main driver that recompiles invalid objects
in the database (or in a given schema) in parallel in dependency
order. It uses information in dependency$ to order recompilation
of dependents after parents.

NOTES:
The parallel recompile exploits multiple CPUs to reduce the time taken to recompile invalid objects. However, please note that recompilation writes significant amounts of data to system tables,
so the disk system may be a bottleneck and prevent significant speedups.

   PARAMETERS:
Threads    (IN) - Number of recompile threads to run in parallel If NULL, 0, or negative, RECOMP_PARALLEL computes a default degree of parallelism as the product of Oracle parameters "cpu_count" and "parallel_threads_per_cpu". On a Real Application Clusters installation, the degree of parallelism is the sum of individual settings on each node in the cluster.
Schema     (IN) - Schema in which to recompile invalid objects If NULL, all invalid objects in the database
                         are recompiled.
Flags      (IN) - Option flags supported (as described above).
   

BEGIN
UTL_RECOMP.recomp_parallel(p_schema_name);
END;

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.