The UTL_RECOMP package is a utility package for recompiling database objects, particularly useful during database upgrades or when objects become invalid. The procedures in this package can be used to recompile objects in the entire database or in a specific schema.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Considerations
- For OceanBase Database versions earlier than V4.3.5 BP2, you must connect as the SYS user to use this package. Other users do not have the privilege to call this package. In V4.3.5 BP2 and later, ordinary users can also call this package.
- When you call
recomp_parallelorrecomp_serial, make sure that no DDL operations are being executed in the system. Otherwise, unexpected situations may occur. - This package compiles
procedure,function,package,trigger, anduser defined typeobjects. - You can query the
all_errorsview to view errors related to individual objects during the compilation process. - System errors that occur during the compilation process are recorded in the
SYS.UTL_RECOMP_ERRORStable.
Overview of UTL_RECOMP subprograms
The following table describes the UTL_RECOMP subprograms supported in the current version of OceanBase Database.
| Subprogram | Description |
|---|---|
| recomp_parallel | Recompiles invalid data program units (such as packages, procedures, functions, and triggers) in parallel. |
| recomp_serial | Compiles database objects in serial. |
| parallel_slave | This is a private subprogram used by the recomp_parallel procedure to perform the actual compilation work. It is typically not called directly by users. |
| truncate_utl_recomp_skip_list | Clears the UTL_RECOMP_SKIP_LIST table, which stores the list of objects that should not be automatically recompiled. |
| populate_utl_recomp_skip_list | Adds records to the UTL_RECOMP_SKIP_LIST table to specify objects to be skipped during recompilation. |
