Search Results rolename_array




Overview

SYS.DBMS_PRIV_CAPTURE is an Oracle-supplied PL/SQL package body that forms the foundation of the database privilege analysis infrastructure. In Oracle E-Business Suite 12.1.1 and 12.2.2, this package operates within the SYS schema and is classified under the generic OTHER API classification within the ETRM documentation. Its primary business function is to observe, record, and evaluate the privilege usage of database sessions as they exercise system privileges, object privileges, and role-based authorities. Rather than enforcing access, DBMS_PRIV_CAPTURE answers the question of which privileges a running session actually consumes, enabling administrators to perform least-privilege analysis, identify unused grants, and tighten security posture across the EBS database tier. The package body is marked VALID in the ETRM metadata, confirming it is fully compiled and operational within the supported EBS release. It is not referenced by any other database object, which indicates it is a top-level administrative utility consumed directly by callers rather than a building block for other packaged code.

The package exposes sixteen documented procedures and functions, grouped logically around privilege detection and session interrogation. All entries are procedural except the HAS_* routines, which return Boolean or numeric results used by callers to make decisions. Representative members include CAPTURE_PRIVILEGE_USE (the principal entry point for recording privilege usage), the SYS privilege probes HIS_SYS_PRIV, HAS_SYS_PRIV_ID, and HAS_SYS_PRIV_DIRECT_ID, the object privilege probes HAS_OBJ_PRIV, HAS_OBJ_PRIV_ID, HAS_OBJ_PRIV_DIRECT, and HAS_OBJ_PRIV_DIRECT_ID, and the role privilege probes HAS_ROLE_PRIV, HAS_ROLE_PRIV_ID, HAS_ROLE_PRIV_DIRECT, and HAS_ROLE_PRIV_DIRECT_ID. The session-oriented variants SES_HAS_SYS_PRIV and SES_HAS_ROLE_PRIV extend the same capability to a specified session context. In practice these routines let a caller determine whether a given privilege is held directly, indirectly through a role, or not at all, which is the core distinction required for meaningful privilege analysis in EBS.

Tables Accessed

The package body depends on a well-defined set of data dictionary and metadata views. It reads OBJ$ and OBJAUTH$ to resolve object identity and object-level grants, and SYSAUTH$ for system privilege grants. USER$ supplies account-level information, while SYSTEM_PRIVILEGE_MAP and TABLE_PRIVILEGE_MAP provide the human-readable naming and numbering of system and table privileges respectively. SESSION_PRIVS and SESSION_ROLES expose the currently enabled privileges and roles of a session. PLITBLM and the ROLE_ARRAY and ROLENAME_ARRAY collection types support array-based traversal of role hierarchies. The package also references STANDARD and its own profile library, PRIV_PROFILE_LIB, which handles the low-level capture bookkeeping. No APPS synonyms are documented for the referenced tables, consistent with this being a SYS-owned utility that reads dictionary base tables directly.

Usage Notes

DBMS_PRIV_CAPTURE is typically invoked by DBA scripts, security assessment tooling, and custom diagnostic code rather than by standard EBS forms or concurrent programs. The documented metadata shows it is referenced by twenty-six other packages, indicating it underpins higher-level privilege analysis features. In EBS 12.1.1 and 12.2.2 environments, administrators may call CAPTURE_PRIVILEGE_USE to record privilege consumption during a defined window, then query the HAS_* functions to reconcile granted versus used privileges. Because the package runs as SYS and touches core dictionary objects, direct invocation should be restricted to authorized DBAs. Custom code should treat the HAS_* routines as read-only probes and reserve CAPTURE_PRIVILEGE_USE for deliberate, scoped capture runs to avoid unnecessary overhead in production.