PL/SQL Sys_Context
Oracle PL/SQL Sys_Context Function
The Sys_Context function returns the user_id from the current Oracle session.
The Sys_Context Function syntax:
sys_context( namespace, parameter, [ length ] )
Parameters: ACTION, AUDITED_CURSORID, AUTHENTICATED_IDENTITY,
AUTHENTICATION_DATA, AUTHENTICATION_METHOD, AUTHENTICATION_TYPE, BG_JOB_ID,
CLIENT_IDENTIFIER, CLIENT_INFO, CURRENT_BIND, CURRENT_SCHEMA, CURRENT_SCHEMAID, CURRENT_SQL, CURRENT_SQL_LENGTH, CURRENT_USER, CURRENT_USERID, DB_DOMAIN,
DB_NAME, DB_UNIQUE_NAME, ENTRYID, ENTERPRISE_IDENTITY, EXTERNAL_NAME, FG_JOB_ID, GLOBAL_CONTEXT_MEMORY, GLOBAL_UID, HOST, IDENTIFICATION_TYPE, INSTANCE,
INSTANCE_NAME, IP_ADDRESS, ISDBA, LANG, LANGUAGE, MODULE, NETWORK_PROTOCOL, NLS_CALENDAR, NLS_CURRENCY, NLS_DATE_FORMAT, NLS_DATE_LANGUAGE, NLS_SORT,
NLS_TERRITORY, OS_USER, POLICY_INVOKER, PROXY_ENTERPRISE_IDENTITY, PROXY_GLOBAL_UID, PROXY_USER, PROXY_USERID, SERVER_HOST, SERVICE_NAME, SESSION_USER,
SESSION_USERID, SESSIONID, SID, STATEMENTID, TERMINAL.
SELECT SYS_CONTEXT ('USERENV', 'SESSION_USER') FROM DUAL; TEST