Search Results lock_opt_all_part




Overview

The CTXSYS.DRIOPT package is an Oracle Text (interMedia) internal PL/SQL package that implements the locking, optimizer, and index-rebuild orchestration logic used by the Oracle Text server components. Within Oracle E-Business Suite 12.1.1 and 12.2.2, it is delivered as part of the CTXSYS schema provisioned by the database tier and is not an EBS-owned object; it is classified under ETRM as an "OTHER" API. Its principal business function is to serialize concurrent operations against Oracle Text index optimization, particularly context index optimization and the online rebuild of index metadata. The package coordinates row-level and object-level locks through the DBMS_LOCK facility so that concurrent DRI (Document Retrieval Interface) optimization jobs, concurrent rebuild requests, and partition-level operations do not corrupt shared index structures. In an EBS environment, this package is reached indirectly through Oracle Text DDL and DML activity — index optimization invoked from concurrent programs, Oracle Text synchronization runs, and background jobs — rather than through direct application calls.

Key Procedures and Functions

The documented API surface comprises eighteen procedures and functions, of which the principal locking routines are outlined below.

  • LOCK_OPT_AF — acquires the optimizer lock in an "after" variant, returning a status value through an OUT parameter.
  • LOCK_OPT — the primary routine that acquires the optimizer lock for a given index context identifier and process identifier, observing a caller-supplied timeout.
  • LOCK_OPT_RET — a function form returning a numeric lock result instead of raising or emitting an OUT parameter.
  • LOCK_OPT_REBUILD — added to support online index rebuild operations, accepting a lock mode and a release-on-commit flag.
  • LOCK_OPT_ALL_PART — acquires locks across all partitions of a partitioned index; the source explicitly notes that if it fails, the calling procedure is responsible for releasing any locks already obtained.
  • LOCK_OPT_MVDATA — locks optimizer materialized-view data, releasing the lock on commit through a commit callback registered against UPDATE_MVDATA.
  • UNLOCK_OPT / UNLOCK_OPT_AF / UNLOCK_OPT_REBUILD / UNLOCK_OPT_ALL_PART — the corresponding release routines, each accepting an ignore-errors flag defaulting to FALSE (or TRUE for the DRIOPT-level IGNORE_ERRORS constant).
  • Additional documented members include START_TIMER, GET_TIMER, GET_STATE, SET_STATE, SET_DDL_LOCK_TIMEOUT, GET_DDL_LOCK_TIMEOUT, INDEXOPTIMIZEREBUILD_VERIFY, and GETSEGMENTINFO, which together provide timing, state-tracking, DDL-lock-timeout control, verification of optimizer rebuild eligibility, and segment-level diagnostics.

Tables Accessed

The package reads from the following dictionary views and objects, resolved in EBS through the APPS synonym layer:

  • DBA_INDEXES — index metadata used to determine index type, status, and optimizer-relevant attributes.
  • DBA_PART_KEY_COLUMNS — partition key definitions, required by the all-partition locking routines.
  • DBA_SEGMENTS — segment sizing and extent information consumed by GETSEGMENTINFO.
  • DBA_TABLES, DBA_TAB_COLUMNS — base table and column metadata for the indexed objects.
  • DBA_TRIGGERS — trigger state used during verify and rebuild checks.
  • DBMS_LOCK — the lock manager package through which all serialization is performed.
  • PLITBLM and V$PARAMETER — internal Text storage and initialization parameters consulted during lock and state handling.

Usage Notes

DRIOPT is an internal Oracle Text package and is not intended for direct invocation from EBS forms or custom PL/SQL. It is referenced by thirteen other packages within the CTXSYS schema, principally the Oracle Text DRI, index optimization, and synchronization drivers. In practice it is invoked when a context index is optimized, when an online index rebuild is requested, or when optimizer state must be persisted across sessions. EBS administrators interacting with Oracle Text should treat DRIOPT as a black box: performance and locking issues surface as waits on DBMS_LOCK resources, and the supported tuning lever is the DDL lock timeout exposed through SET_DDL_LOCK_TIMEOUT rather than direct manipulation of the package's procedures.