Search Results get_db_version_num




Overview

The APPS.DOM_DOC_TEXT_UTIL package is a utility package within the Oracle EBS Document Management (DOM) product family, providing infrastructure for storing, retrieving, and indexing large text documents attached to application entities. It is a foundational utility—classified by ETRM as a UTIL API—rather than a business-facing API. Its primary runtime consumer is the Oracle Text indexing subsystem, invoked through the DOM Document Management forms and concurrent programs to keep the text indexes for document attachments synchronized. The package header metadata shows a source file of DOMUIMTS.pls, a header revision of 120.1 dated July 2006, and AUTHID DEFINER declarations, indicating it executes with the privileges of its owner, APPS, which allows it to access dictionary and context DDL objects on behalf of calling users without granting them direct privileges. Two internal constants, g_Internal_Type and g_Customer_Type, suggest the package distinguishes between internally generated and customer-supplied document text when resolving or formatting content.

Key Procedures and Functions

The package exposes ten documented procedures and functions (only a subset appears in the source excerpt):

  • SET_CONTEXT — initializes a session-level context used by the remaining procedures, most likely binding NLS or application context values that affect document text processing.
  • GET_DOC_TEXT — retrieves the document text for a given row, returning it either as a CLOB or as a VARCHAR2 character buffer depending on the requested output type, allowing callers to choose the form that suits their consumer.
  • PRINT_LOB — writes the contents of a supplied LOB locator to output, used for display or diagnostics of stored document text.
  • SYNC_INDEX — synchronizes the Oracle Text index for document attachments, flushing pending rows into the searchable index.
  • SYNC_INDEX_FOR_FORMS — a forms-oriented variant of index synchronization, tuned for interactive invocation from the Document Management forms UI.
  • OPTIMIZE_INDEX — invokes index optimization to consolidate index fragments and reclaim space after repeated DML on document text.
  • GET_PROD_SCHEMA — returns the product schema name, used to resolve which owning schema's objects should be addressed.
  • GET_DB_VERSION_NUM — returns the database version as a numeric value, enabling version-dependent branching in the package's own logic and for callers that must adapt to 11g versus 12c behavior.
  • GET_DB_VERSION_STR — returns the database version in string form, the companion to the numeric accessor.
  • INSERT_UPDATE_DOC — inserts or updates document text records, serving as the write path alongside the read path provided by GET_DOC_TEXT.

No parameter lists are documented for these entry points in the available metadata and none are asserted here.

Tables Accessed

ETRM documents the package as referencing these objects via APPS synonyms: AD_CTX_DDL, DBMS_LOB, DBMS_UTILITY, and V$NLS_PARAMETERS. AD_CTX_DDL is the Oracle Applications context DDL package used to create and manage the Oracle Text preference and index objects that back document search. DBMS_LOB provides the LOB read and write primitives behind GET_DOC_TEXT, PRINT_LOB, and INSERT_UPDATE_DOC. DBMS_UTILITY supplies general utility calls, consistent with the version accessors and identifier manipulation. V$NLS_PARAMETERS is queried to determine session NLS settings, most plausibly NLS_CHARACTERSET and language, which govern how CLOB-to-character conversion is performed when a document is returned as VARCHAR2. The version accessors likely read from the data dictionary rather than a business table.

Usage Notes

DOM_DOC_TEXT_UTIL is an internal utility rather than a public integration API. It is called by the Document Management forms to fetch and print attachment text, and by concurrent or background processes that synchronize and optimize Oracle Text indexes; ETRM records only one other package referencing it, reinforcing its narrow, subsystem-internal role. Because it is declared AUTHID DEFINER and manipulates Oracle Text DDL through AD_CTX_DDL, direct invocation by custom code is generally discouraged: customers should prefer the supported Document Management APIs and let this utility be invoked on their behalf. The GET_DB_VERSION_NUM and GET_DB_VERSION_STR functions are the only entry points of general interest to developers, useful when custom code must branch on the database release. In EBS 12.1.1 and 12.2.2 the package's behavior is essentially identical, since its version-detection logic exists precisely to absorb differences between the underlying database releases. Any custom dependency on the Index-synchronization procedures should account for the maintenance windows in which Oracle Text index operations are normally scheduled.