Search Results manage_oki_index




Overview

The APPS.OKI_DBI_SCM_RSG_API_PVT package body is a private (PVT-classified) PL/SQL implementation within the Oracle E-Business Suite Supply Chain Management (SCM) reporting infrastructure. It functions as the OKI-specific custom API handler for the Oracle Business Intelligence (OBI) materialized view and index management framework, driven by the shared BIS_BIA_RSG_CUSTOM_API_MGMNT utility. The package allows the generic Relational Schema Generator (RSG) customization mechanism to perform Oracle Knowledge Initiative (OKI) specific actions when the framework transitions between API types such as MV_LOG_MGT (log management) and MV_INDEX_MGT (index management).

Its primary purpose is to manage index lifecycle operations on the OKI DBI (Daily Business Intelligence) schema objects — specifically creating, dropping, and synchronizing indexes on materialized views and their underlying tables — while remaining compliant with the standard parameter-passing contract expected by the RSG framework. The package therefore bridges the generic DBI refresh logic with OKI-specific database index maintenance, contributing to the performance and refresh integrity of SCM DBI datamarts.

Key Procedures and Functions

The package exposes five documented procedures/functions:

  • OKI_CUSTOM_API — The main entry point invoked by the RSG framework. It retrieves standard parameters (API_TYPE, MODE, OBJECT_NAME) via BIS_BIA_RSG_CUSTOM_API_MGMNT.Get_Param, writes diagnostic entries through BIS_BIA_RSG_CUSTOM_API_MGMNT.Log, and directs execution to index management based on the incoming API type. It conforms to the RSG custom API contract (Standard 2) for parameter retrieval.
  • MANAGE_OKI_INDEX — The core index-management routine dispatched from OKI_CUSTOM_API. It determines whether indexes should be rebuilt, dropped, or created, and orchestrates the sequence of index operations against the OKI_DBI_INDEXES registry and the underlying database dictionary. Its logic is reported to execute index maintenance only when the database version predates the 10G index-visibility feature, avoiding redundant operations on more recent releases.
  • DROP_INDEX — Removes an existing index from the database, typically prerequisite to a rebuild or a refresh of the associated materialized view.
  • CREATE_INDEX — Recreates or builds an index as part of the refresh cycle, restoring the access paths required by downstream DBI reporting queries.
  • SLEEP — A utility routine used to pause execution, ensuring that long-running index operations and database lock acquisitions (via DBMS_LOCK) synchronize correctly with concurrent refresh or DDL activity.

Tables Accessed

Through APPS synonyms, the package references the following objects:

  • OKI_DBI_INDEXES — The OKI-maintained registry of DBI indexes; read and updated to track which indexes exist, their target tables/columns, and their refresh status. This is the object most directly associated with the user's search term.
  • ALL_INDEXES — The Oracle data dictionary view used to verify the physical existence and attributes of an index before drop or create operations.
  • DBMS_LOCK — Utilized to serialize index management activity, preventing concurrent sessions from corrupting index state.
  • DBMS_METADATA — Employed to extract DDL for existing indexes so that they can be faithfully recreated.
  • V$INSTANCE — Queried to detect database version/instance characteristics, supporting the conditional behavior around pre-10G index handling.

Usage Notes

This is a private package invoked indirectly rather than directly by end users. It is called during DBI materialized view refresh and index maintenance cycles triggered by the RSG framework, commonly through concurrent programs that execute the BIS/BIA refresh schedule. Because it depends on BIS_BIA_RSG_CUSTOM_API_MGMNT, it must be invoked within that framework's parameter-passing context. The package is referenced by one other package, confirming it is an internal dependency rather than a public API. Customizations that alter OKI DBI index behavior should be validated against pre- and post-10G database releases, given the version-conditional logic in MANAGE_OKI_INDEX.