Search Results cdbcon_name2ids




Overview

DBMS_SQLTUNE_UTIL0 is an internal Oracle database package owned by SYS that provides the low-level utility layer underpinning the SQL Tuning Advisor and SQL Plan Management infrastructure. It is not an Oracle E-Business Suite product package and carries no direct business function within the EBS application schema itself. Instead, it is a kernel-side helper invoked by the public DBMS_SQLTUNE and DBMS_SQLPA interfaces, which Oracle EBS Release 12.1.1 and 12.2.2 administrators use for SQL statement analysis, SQL profile management, and automatic SQL tuning. The package is classified under the ETRM "OTHER" API category, confirming that it is documented for diagnostic and reference purposes rather than as a supported extension point.

The package exposes functionality that converts raw SQL text into the identifiers Oracle's tuning repository requires, resolves container and bind metadata, and bridges the multitenant dictionary views introduced with Oracle Database 12c. This last capability is directly relevant to users searching for cdbcon_name2ids, a routine that maps a container name to its internal container identifiers.

Key Procedures and Functions

Thirteen documented routines comprise the package interface:

  • SQLTEXT_TO_SIGNATURE — Returns the signature of a supplied SQL text. The signature identifies SQL text within DBA_SQL_PROFILES; a force-match variant produces the FORCE_MATCH signature rather than the EXACT signature.
  • SQLTEXT_TO_SQLID — Returns the SQL ID corresponding to a given SQL text, allowing identification of statements in V$SQL-family views.
  • VALIDATE_SQLID — Checks whether a supplied SQL ID is valid.
  • EXTRACT_BIND — Extracts a single bind variable from a SQL statement or bind set.
  • EXTRACT_BINDS — Extracts the full collection of bind variables associated with a SQL statement.
  • IS_BIND_MASKED — Indicates whether a bind is masked, supporting sensitive-data handling in captured SQL.
  • GET_BINDS_COUNT — Returns the number of binds present in a statement.
  • CDBCON_DBID_TO_NAME — Maps a container database ID to its container name.
  • CDBCON_ID_TO_DBID — Maps a container ID to its database ID.
  • CDBCON_NAME2IDS — Resolves a container name to its associated container identifiers.
  • CDB_IS_ROOT — Determines whether the current container is the root container.
  • CDB_IS_PDB — Determines whether the current container is a pluggable database.

The CDB-oriented members are inert in non-multitenant 11g-based EBS 12.1.1 databases and become meaningful only when EBS 12.2.2 is deployed on Oracle Database 12c or later.

Tables Accessed

The supplied ETRM metadata records no tables referenced through APPS synonyms, which is consistent with the package's role as an internal utility operating against fixed SYS-owned dictionary and tuning repository objects. In practice its routines read multitenant container metadata (V$CONTAINERS and related CDB views) for the CDBCON and CDB_IS_ROOT/CDB_IS_PDB functions, and reference the SQL profile and SQL statement repositories underlying DBA_SQL_PROFILES and V$SQL for the signature, SQL ID, and bind routines. The package writes no application data.

Usage Notes

DBMS_SQLTUNE_UTIL0 is invoked indirectly. In EBS 12.1.1 and 12.2.2 it is called by DBMS_SQLTUNE and its dependents during SQL Tuning Advisor runs, SQL profile creation and acceptance, and Automatic SQL Tuning Advisor maintenance windows. The metadata shows it is referenced by fourteen other packages, confirming its position as a shared internal dependency rather than a top-level entry point. Oracle does not document these routines for direct customer invocation, and their signatures may change between database releases.

Custom code should never call DBMS_SQLTUNE_UTIL0 directly; equivalent supported behavior is available through DBMS_SQLTUNE. The only practical customer-facing use is diagnostic: querying CDBCON_NAME2IDS or the other CDB helpers to interpret container identifiers when troubleshooting EBS 12.2.2 multitenant deployments or when decoding output from the tooling that depends on this package.