Search Results get_last_imported
Overview
FND_OAM_DSCFG_INSTANCES_PKG is a server-side PL/SQL package owned by the APPS schema that supports the Oracle E-Business Suite Diagnostics and Configuration framework. Specifically, it manages the lifecycle and runtime state of configuration instances — records that represent a snapshot of a source EBS environment (such as a production database) that has been captured for diagnostic, cloning, or import comparison purposes. The package is declared with AUTHID CURRENT_USER, meaning its SQL executes under the privileges of the calling user rather than the package owner.
The package's central role is to maintain an internal package state (a "current configuration instance") during an import operation. When a configuration instance is added or selected, the package retains its identifier, instance type, source DB name, clone key, and policy set identifier in package-level variables, so that subsequent calls in the same session can retrieve them without repeated queries. This design supports the Diagnostics import workflow, where procedures need consistent access to metadata about the instance being processed.
Key Procedures and Functions
The 18 documented routines fall into several functional groups:
- Initialization and state accessors:
IS_INITIALIZEDreports whether the package state has been set.GET_CURRENT_IDandGET_CURRENT_TYPEreturn the identifier and type of the current configuration instance from the last successful add or set operation.GET_CURRENT_SOURCE_DBNAME,GET_CURRENT_CLONE_KEY, andGET_CURRENT_POLICYSET_IDexpose the source database name, clone key, and policy set identifier respectively; these values help custom import procedures determine which steps apply. - Mutation routines:
ADD_CONFIG_INSTANCEinserts a new configuration instance and initializes package state.SET_CURRENT_CONFIG_INSTANCE— the routine referenced by the user's search — establishes which existing configuration instance is "current" for the session and populates the accessor variables.DELETE_CONFIG_INSTANCEremoves a configuration instance.CONFIG_INSTANCE_EXISTSperforms an existence check before add or delete operations. - Import tracking:
SET_LAST_IMPORTEDandGET_LAST_IMPORTEDrecord and retrieve the last import timestamp;SET_IMPORT_DURATIONandGET_IMPORT_DURATIONcapture how long the import ran. - Compile tracking:
SET_LAST_COMPILEDandGET_LAST_COMPILEDrecord the last compilation timestamp, whileSET_COMPILE_DURATIONandGET_COMPILE_DURATIONtrack compilation elapsed time.
The accessors throw a NO_DATA_FOUND exception if package state has not been initialized, so callers should test IS_INITIALIZED first.
Tables Accessed
The package reads and writes several dictionary tables by way of APPS synonyms:
FND_OAM_DSCFG_INSTANCESand its siblingFND_OAM_DSCFG_INSTANCES_Sstore the configuration instance records and translated/denormalized values used by the accessors and mutation routines.FND_OAM_DSCFG_OBJECTSstores the objects associated with a configuration instance, supporting existence checks and deletion cascades.FND_OAM_DSCRAM_RUNS_Bstores diagnostic run header information that links configuration instances to executed diagnostic runs.DBMS_SQLandPLITBLMare Oracle-supplied packages used for dynamic SQL and PL/SQL table manipulation, likely for bulk operations during import.
Usage Notes
FND_OAM_DSCFG_INSTANCES_PKG is not an end-user-facing API; it is invoked internally by the Diagnostics configuration import framework, and it is referenced by five other packages that orchestrate that framework. Typical call sequences open with IS_INITIALIZED or CONFIG_INSTANCE_EXISTS, proceed through ADD_CONFIG_INSTANCE or SET_CURRENT_CONFIG_INSTANCE, and then read state with the various GET_* accessors. Timestamp and duration setters are used by import and compile driver code to record progress metrics.
Because package state is session-scoped, custom code that calls these routines must execute within the same database session that performed the add or set; state is not shared across connections. When no instance has been selected, the accessors raise NO_DATA_FOUND. The routine most relevant to the user's search, SET_CURRENT_CONFIG_INSTANCE, is the standard entry point for switching the active configuration instance mid-session during import processing.