Search Results patch_log




Overview

AD_ZD_MVIEW is an Oracle E-Business Suite internal PL/SQL package owned by APPS and classified generically as OTHER within the ETRM repository. It forms part of the AD Online Patch (adop) and Online Patching infrastructure introduced with the 12.2 architecture, where the file system and database are organized into edition-based redefinition (EBR) editions. Its principal business function is the management of materialized views and materialized view logs during patching, cutover, and database upgrade operations. Rather than exposing user-facing functionality, AD_ZD_MVIEW provides the low-level primitives the AD utilities use to reconcile, patch, regenerate, or drop materialized views across editions so that application code referencing a materialized view continues to resolve correctly after patch application or cutover.

Key Procedures and Functions

The package exposes thirteen documented procedures and functions. Collectively they cover three areas of responsibility: patching, upgrade, and synchronization lifecycle management.

  • PATCH — applies a materialized view definition (supplied as a CLOB) or patches an existing materialized view identified by owner, name, and optional type. This is the entry point for propagating new or changed MV definitions into the current edition.
  • DROP_MVQ — drops the materialized view queue (the MVQ view) associated with a materialized view.
  • INSTALL_MVQ_ARCH — installs the MVQ archival structure, with a flag to optionally skip MV processing.
  • DROP_MV — removes a materialized view using supplied DROP and UPDATE statements and returns whether the object was actually dropped.
  • UPGRADE — upgrades a single materialized view by owner and name.
  • UPGRADE_DB — performs the equivalent upgrade operation across the database, with an execute flag controlling dry-run versus actual execution. This is the routine most closely associated with searches for “upgrade_db.”
  • GENERATE — returns the DDL/definition of a specified materialized view as a CLOB for a given owner and name.
  • GET_MVQ_NAME / GET_MV_NAME — return the generated MVQ view name or materialized view name, optionally with an extension suffix.
  • FINALIZE — completes the materialized view synchronization lifecycle.
  • CUTOVER — invokes the cutover phase processing for materialized views, with an execute flag.
  • PATCH_LOG — records patching activity for a given owner and table name.

Global constants g_mvq_char, g_mvl_char, and g_mvm_char designate the marker characters used to construct MVQ view, MV log view, and MV marker names.

Tables Accessed

The package references a combination of EBS patch metadata tables and Oracle data dictionary views. AD_OBSOLETE_OBJECTS and AD_PATCHED_TABLES track objects that have been retired or modified by a patch, and AD_ZD_CLOB stores the CLOB payloads used during online patching. FND_ORACLE_USERID and FND_PRODUCT_INSTALLATIONS supply Oracle schema owner information and product installation status. The dictionary views DBA_MVIEWS, DBA_MVIEW_LOGS, DBA_MVIEW_LOG_FILTER_COLS, DBA_TABLES, DBA_TAB_COLS, DBA_INDEXES, DBA_CONSTRAINTS, DBA_DEPENDENCIES, DBA_OBJECTS, and DBA_SYNONYMS are queried to identify materialized views, their log structures, dependencies, and dependent synonyms before patching or dropping them.

Usage Notes

AD_ZD_MVIEW is not intended for direct invocation by end users or casual custom code. It is called internally by Oracle EBS patching utilities and by other AD packages—five packages are documented as referencing it—during adop phases such as apply, cutover, and cleanup, and during the 12.2 database upgrade. The UPGRADE_DB procedure in particular may be invoked as part of upgrade driver scripts; its default execute flag of 1 permits controlled dry-run testing when set to 0. Because it holds AUTHID CURRENT_USER and relies on APPS synonyms over DBA views, callers must possess the appropriate privileges. Direct modification or manual execution outside of a sanctioned patch or upgrade cycle is unsupported and can leave materialized views and MV logs in an inconsistent state across editions.