The UTL_RECOMP system package is a utility package for recompiling database objects. You can use the package to verify the validity of database objects after an upgrade. You can call programs in this package to recompile all objects or objects with the specified schema in the database.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
Considerations
- In OceanBase Database of a version earlier than V4.3.5 BP2, to use this package, you must connect to the database as the
SYSuser. 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 the
RECOMP_PARALLELorRECOMP_SERIALprocedure, make sure that no DDL operation is in progress in the system. Otherwise, exceptions may occur. - You can call this package to compile a variety of objects, such as procedures, functions, packages, triggers, and user-defined data types (UDTs).
- You can query the
ALL_ERRORSview for errors related to a single object that occur during object compilation. - You can query the
SYS.UTL_RECOMP_ERRORStable for system errors that occur during compilation.
Subprograms
The following table describes the UTL_RECOMP subprograms supported by the current OceanBase Database version.
| Subprogram | Description |
|---|---|
| RECOMP_PARALLEL | Recompiles invalid data program units, such as packages, procedures, functions, and triggers, in parallel. |
| RECOMP_SERIAL | Recompiles database objects in serial. |
| PARALLEL_SLAVE | A private subprogram that actually performs compilation when the recomp_parallel subprogram is called. Generally, this subprogram is not directly called by users. |
| TRUNCATE_UTL_RECOMP_SKIP_LIST | Truncates the UTL_RECOMP_SKIP_LIST table, which stores a list of objects excluded from automatic recompilation. |
| POPULATE_UTL_RECOMP_SKIP_LIST | Adds objects to the UTL_RECOMP_SKIP_LIST table. The added objects are skipped during recompilation. |