Search Results check_system_locks




Overview

BSC_LOCKS_PUB is a public PL/SQL package in the APPS schema belonging to the Oracle Balanced Scorecard (BSC) product family, the module that underpins the Oracle EBS Balanced Scorecard and the broader Enterprise Performance Foundation. Its business role is to serialize access to shared configuration and metadata objects: it grants, checks, resolves, and releases logical locks that prevent two concurrent sessions from editing the same Balanced Scorecard definition (a KPI, a dataset, a dimension group, a periodicity assignment, or a tab layout) at the same time. Because Balanced Scorecard metadata is heavily denormalized and tightly interconnected, uncontrolled parallel edits can corrupt hierarchy or measure definitions; this package is the mechanism that protects them. It is not intended for customer use as a general-purpose locking facility, but it is exposed as a PUB API and is invoked by several internal BSC packages.

The package carries a VALID status in the APPS schema under both Oracle EBS 12.1.1 and 12.2.2 and is owned by APPS, its body compiled against the SYS STANDARD package and the BSC lock type definitions described below.

Key Procedures and Functions

Eleven documented routines are recorded for the package, of which eight are named in the metadata. The naming shows an intentional pairing of singular and plural helpers, and includes a faithfully preserved spelling artifact in the code base.

  • SYNCHRONIZE — the principal entry point. Establishes or refreshes the lock state for a requested object so that the calling session holds exclusive or shared rights before it proceeds with an update.
  • CHECK_SYSTEM_LOCK and CHECK_SYSTEM_LOCKS — test whether a single object, or a set of objects, is currently locked by another session. The plural form allows a screen or process to validate an entire edit set at once.
  • GET_SYSTEM_LOCK and GET_SYSTEN_LOCK — acquire a lock and return the lock information to the caller. Note that the misspelled form GET_SYSTEN_LOCK is retained in the shipped code and must be referenced exactly as spelled.
  • GET_SYSTEN_LOCKS — the plural counterpart, returning lock information for multiple objects in a single call.
  • REMOVE_SYSTEM_LOCK — releases the lock held by the session, called on commit, on cancel, or when the editing window closes.
  • GET_SYSTEM_TIME — returns the database system time, which the lock logic compares against stored acquisition timestamps to detect stale locks.

All lock operations are typed through the BSC_LOCK_LOCK_TYPE_LIST, BSC_LOCK_OBJECT_KEY_LIST, and BSC_LOCK_OBJECT_TYPE_LIST collections, which carry the object type, the identifying key, and the requested lock mode.

Tables Accessed

The package reads and writes the lock repository BSC_OBJECT_LOCKS and its associated BSC_OBJECT_LOCK_USERS table, which together record which session owns which lock and when it was taken. BSC_CURRENT_SESSIONS supports user and session identification. The metadata tables BSC_KPIS_B, BSC_SYS_DATASETS_B, BSC_SYS_DIM_GROUPS_TL, BSC_SYS_DIM_LEVELS_B, BSC_SYS_MEASURES, BSC_SYS_PERIODICITIES, BSC_SYS_CALENDARS_B, BSC_TABS_B, and BSC_TAB_VIEWS_B supply the object keys being locked, while BSC_DB_TABLES and the DBMS_STATS package are used for statistics-related housekeeping. FND_MENUS is referenced for menu and function security context. All are reached through APPS synonyms.

Usage Notes

BSC_LOCKS_PUB is an internal publication API rather than a customer extension point. It is called primarily by other BSC packages — BSC_METADATA_OPTIMIZER_PKG, BSC_MIGRATION, BSC_MO_UI_PKG, BSC_UPDATE, and BSC_UPDATE_LOCK — and by the Balanced Scorecard administrative forms when a user opens a definition for editing. Concurrent programs performing metadata migration or optimizer runs should call CHECK_SYSTEM_LOCKS before writes and REMOVE_SYSTEM_LOCK on completion. Locks left behind by terminated sessions are cleared during synchronize operations.