Search Results table_size




Overview

ALR_PROFILE is an Oracle E-Business Suite database package that implements a lightweight profile option cache for the Alert Manager (ALR) subsystem. It is owned by APPS and classified as an "OTHER" API within the ETRM repository. The package body maintains two package-level PL/SQL tables, VAL_TAB and NAME_TAB, which cache profile option names and their corresponding values in memory for the duration of a database session. A package-level counter, TABLE_SIZE, tracks the number of cached entries. The package abstracts the retrieval and storage of Alert Manager profile settings so that calling code does not have to query the underlying table each time a value is required.

Key Procedures and Functions

ETRM documents three public units on this package: GET, PUT, and VALUE. Three additional internal helpers—FIND, GET_DB, and the caching infrastructure—support their operation. The most relevant unit to the user query "get_db" is the internal procedure GET_DB, which performs the physical database read on behalf of the cache.

  • GET_DB — Retrieves a profile option value directly from the database by opening an explicit cursor against ALR_PROFILE_OPTIONS. It returns the profile option value and a boolean flag indicating whether the option was actually defined. When no row is found, the value is set to NULL and the defined flag is set to FALSE; otherwise the flag is TRUE. It is the fallback path used when a requested option is not present in the in-memory cache.
  • GET — Public accessor that returns the value of a named profile option, consulting the cache first and invoking the database fetch when necessary.
  • PUT — Writes or updates a profile option value in the cache, creating a new entry when the option name is not already present.
  • VALUE — Public function that exposes a cached profile value to callers.
  • FIND — Internal function that linearly scans NAME_TAB to locate the index of a cached option name, returning TABLE_SIZE when the name is absent.

Tables Accessed

The package reads from ALR_PROFILE_OPTIONS through the APPS synonym. The table stores Alert Manager profile option names and values, keyed by profile_option_name with the corresponding value in profile_option_value. GET_DB performs a single-row, equality-based lookup on this column. No other table is documented as being accessed, and the cache itself is held entirely in PL/SQL memory rather than in a database table.

Usage Notes

ALR_PROFILE is referenced by three other packages in the E-Business Suite, which indicates it is an internal dependency of the Alert Manager rather than a general-purpose profile framework. It is typically invoked from PL/SQL code that needs reliable, low-overhead access to Alert Manager configuration settings, including concurrent programs and alert processing logic. Because the cache is session-scoped and populated lazily, values retrieved early in a session may not reflect updates committed by other sessions until the cache is refreshed. Customizations that modify ALR_PROFILE_OPTIONS directly should therefore account for cached values when predictable behavior is required.