End-User Security Context Views

These views help you inspect the active end-user security context and validate the end-user identity and resolved data roles.

Summary of views

View or Object Name Description
DBA_END_USER_SECURITY_CONTEXTS Displays all end-user security contexts currently maintained in the database.
DBA_END_USER_SECURITY_CONTEXT_DATA_ROLES Displays data roles enabled in end-user security contexts.
DBA_END_USER_SECURITY_CONTEXT_ATTRIBUTES Displays the end-user context attributes as of the last saved state for each end-user security context.
END_USER_CONTEXT Displays the end-user context attributes in the current end-user security context.
V$END_USER_DATA_ROLE Displays data roles in the end-user security context for the current request.

DBA_END_USER_SECURITY_CONTEXTS

Displays all end-user security contexts currently maintained in the database. Each security context represents an active or cached end-user session with associated metadata, such as creation time, last access time, and inactivity timeout.

Column Datatype NULL Description
USERNAME VARCHAR2(128) NOT NULL User name for the end-user security context
CONTEXT_ID RAW(16) NOT NULL Unique end-user security context identifier
LOOKUP_KEY VARCHAR2(1024) Lookup key associated with the end-user security context
CREATED_TIME TIMESTAMP(6) WITH TIME ZONE Creation time of the end-user security context
LAST_ACCESS_TIME TIMESTAMP(6) WITH TIME ZONE Most recent access time of the end-user security context
INACTIVE_TIMEOUT_MINUTES NUMBER(6) End-user security context inactivity timeout value (in minutes)
USER_TYPE VARCHAR2(8)

User type of the end-user security context:

  • EXTERNAL

  • LOCAL

SECURITY_CONTEXT_TYPE VARCHAR2(19)

Type of the end-user security context:

  • DIRECT_LOGON

  • THROUGH_APPLICATION

DBA_END_USER_SECURITY_CONTEXT_DATA_ROLES

Displays the data roles enabled within each end-user security context. Join on the CONTEXT_ID column with DBA_END_USER_SECURITY_CONTEXTS to correlate roles with specific end-user sessions.

Column Datatype NULL Description
USERNAME VARCHAR2(128) NOT NULL User name for the end-user security context
CONTEXT_ID RAW(16) NOT NULL Unique end-user security context identifier
DATA_ROLE VARCHAR2(128) NOT NULL Name of the enabled data role

DBA_END_USER_SECURITY_CONTEXT_ATTRIBUTES

Displays the end-user context attributes as of the last saved state for each end-user security context.

Column Datatype NULL Description
USERNAME VARCHAR2(128) NOT NULL User name for the end-user security context
CONTEXT_ID RAW(16) NOT NULL Unique identifier of the end-user security context
CONTEXT JSON End-user context attributes as of the last saved state, in JSON format

END_USER_CONTEXT

Displays the end-user context attributes in the current end-user security context. For the supported query format and context-discovery restrictions, see Read End-User Context Attributes.

Column Datatype NULL Description
OWNER VARCHAR2(128) Owner of the end-user context
NAME VARCHAR2(128) Name of the end-user context
CONTEXT JSON Context attributes for the current request, in JSON format

V$END_USER_DATA_ROLE

Displays the data roles activated in the end-user security context for the current database request. This dynamic performance view is useful for runtime diagnostics and verifying that expected data roles are active within a session.

Column Datatype Description
ROLE_NAME VARCHAR2(4000) Name of the activated data role in the current request
CON_ID NUMBER

The ID of the container to which the data pertains. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB; this value is also used for rows in non-CDBs

  • 1: This value is used for rows containing data that pertain to only the root

  • n: Where n is the applicable container ID for the rows containing data