Search Results dbms_sys_sql




Overview

SYS.DBMS_SYS_SQL is an Oracle-supplied, undocumented PL/SQL package body owned by the SYS schema. It is a foundational utility used internally by Oracle Database and by Oracle E-Business Suite components that must execute dynamically constructed SQL against an arbitrary schema. In EBS 12.1.1 and 12.2.2, the package is a critical enabler of the AD utilities, patching infrastructure, and administrative tooling that require the ability to parse and execute SQL as a user other than the connected session, and to perform DDL operations within the context of the database itself. Because it is owned by SYS and protected, it is not intended for direct invocation by application developers; nonetheless, its presence is validated as part of the standard EBS database object inventory, and its status is reported as VALID in the ETRM dependency tree.

The documented dependency list confirms the package is layered on top of DBMS_SQL, the standard dynamic SQL interface, and relies on DBMS_STANDARD, STANDARD, UTL_IDENT, and SYS_STUB_FOR_PURITY_ANALYSIS for its supporting routines and purity assertions. It is not referenced by any other database object in the documented graph, but it is referenced by 69 other packages, which indicates it functions as a low-level dependency for a broad set of internal Oracle and EBS maintenance routines.

Key Procedures and Functions

The ETRM metadata records zero documented procedures or functions for SYS.DBMS_SYS_SQL. The object is catalogued as an API classified "OTHER," and no published specification is provided in the EBS documentation set. In practice the package body contains internal entry points such as PARSE_AND_EXECUTE and related routines used to compile and run SQL statements under a different schema owner. Because these interfaces are undocumented and unsupported, they are not intended for direct use, and parameter lists are deliberately omitted here. Administrators and developers who require dynamic SQL execution should use the supported DBMS_SQL or EXECUTE IMMEDIATE facilities instead.

Tables Accessed

No tables are documented as accessed through APPS synonyms, which is expected for a package whose purpose is to execute arbitrary statements rather than to read or write a fixed set of application tables. The package operates against the data dictionary and against whatever objects the dynamically submitted SQL references; therefore the effective table footprint is determined at runtime by the caller.

Usage Notes

In EBS, SYS.DBMS_SYS_SQL is invoked indirectly through database utilities that need to execute SQL as another schema. When a session executes dynamic SQL under a different owner, the call is channelled through the calling package, which in turn delegates to DBMS_SQL. Typical consumers include patch drivers and administrative scripts executed during upgrades or maintenance windows. Direct invocation from EBS forms, concurrent programs, or custom code is not supported and is strongly discouraged.

  • Do not grant EXECUTE on SYS.DBMS_SYS_SQL to application schemas; doing so undermines the security model.
  • Use DBMS_SQL or EXECUTE IMMEDIATE for dynamic SQL in custom code; these are documented and supported.
  • If the package becomes INVALID after an upgrade or patch, recompile it as SYS or run utlrp.sql to restore validity.
  • Its VALID status should be verified as part of standard EBS health checks, since dependent maintenance routines may fail if it is not recompiled.