Search Results compile_schema




Overview

AD_INST is a privileged server-side PL/SQL package shipped with Oracle E-Business Suite and owned by the SYSTEM schema. Its documented purpose is to provide support for R10.7 and higher server-side code — that is, it underpins the internal utilities and installation/upgrade machinery that must operate with elevated database privileges rather than within the restricted APPS schema. Because it is created in a privileged account, the package is granted explicit object and system privileges (for example create user, select any table, create any procedure, create any trigger, create any view, execute any procedure, drop any procedure, drop any trigger, drop any view, drop any synonym, and unlimited tablespace). The package has shipped with the same core interface since at least the 2005 copyright header (version 120.0) and remains present in 12.1.1 and 12.2.2. In the ETRM 12.2.2 classification it is registered as an OTHER API owned by SYSTEM, exposing two documented procedures and referencing DBA_OBJECTS and DBMS_SQL, and it is referenced by two other packages.

Key Procedures and Functions

  • COMPILE_SCHEMA — Compiles all invalid objects in a schema. The caller supplies the Oracle user name (schema) to compile. The procedure deliberately avoids a blanket recompile: for performance reasons it recompiles only objects that are currently invalid, rather than invoking the equivalent DBMS compile_schema behavior across the entire schema. Any compilation errors encountered are ignored. This is the procedure associated with the search term "compile_schema" and is the primary entry point users look for when resolving INVALID objects after patching or upgrades.
  • DO_APPS_DDL — Executes a supplied SQL DDL statement in a named schema. It works by constructing and running a PL/SQL block of the form begin <username>.apps_ddl.apps_ddl(:ddl_text); end;, allowing DDL to be applied as the target schema without logging in directly as that user. The caller provides the schema name and the DDL text.

Tables Accessed

Documented table and package references are DBA_OBJECTS and DBMS_SQL. DBA_OBJECTS is the data dictionary view queried to identify objects whose STATUS is INVALID within the requested schema; this is what allows COMPILE_SCHEMA to restrict its work to invalid objects only. DBMS_SQL is the dynamic SQL facility used to parse, execute, and manage the DDL statements submitted through DO_APPS_DDL, and it similarly supports the dynamic recompilation performed by COMPILE_SCHEMA.

Usage Notes

AD_INST is internal infrastructure and is not intended for direct customer invocation. It is normally called by Oracle-supplied maintenance, patching, and installation/upgrade code — consistent with the ETRM note that it is referenced by two other packages — rather than by Forms, concurrent programs, or end-user flows. When troubleshooting invalid objects in an EBS environment, COMPILE_SCHEMA is the documented mechanism for recompiling only the invalid objects in a given schema; operators should note that compile errors are silently ignored, so the schema should be re-queried against DBA_OBJECTS afterwards to confirm that the invalid count has cleared. DO_APPS_DDL is used where equivalent DDL must be run under a specific schema while executing from the privileged account. Any privileges granted to the SYSTEM account for this package must be granted directly, since they cannot be inherited through a role such as DBA.