User Session Info

-- ##############################################################################
--       USER SESSION INFO
--       http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/functions122a.htm
-- ##############################################################################

SELECT 'AUDITED_CURSORID', SYS_CONTEXT('USERENV', 'AUDITED_CURSORID') FROM DUAL UNION ALL
SELECT 'AUTHENTICATION_DATA', SYS_CONTEXT('USERENV', 'AUTHENTICATION_DATA') FROM DUAL UNION ALL
SELECT 'AUTHENTICATION_TYPE', SYS_CONTEXT('USERENV', 'AUTHENTICATION_TYPE') FROM DUAL UNION ALL
SELECT 'BG_JOB_ID', SYS_CONTEXT('USERENV', 'BG_JOB_ID') FROM DUAL UNION ALL
SELECT 'CLIENT_IDENTIFIER', SYS_CONTEXT('USERENV', 'CLIENT_IDENTIFIER') FROM DUAL UNION ALL
SELECT 'CLIENT_INFO', SYS_CONTEXT('USERENV', 'CLIENT_INFO') FROM DUAL UNION ALL
SELECT 'CURRENT_SCHEMA', SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA') FROM DUAL UNION ALL
SELECT 'CURRENT_SCHEMAID', SYS_CONTEXT('USERENV', 'CURRENT_SCHEMAID') FROM DUAL UNION ALL
SELECT 'CURRENT_SQL', SYS_CONTEXT('USERENV', 'CURRENT_SQL') FROM DUAL UNION ALL
SELECT 'CURRENT_USER', SYS_CONTEXT('USERENV', 'CURRENT_USER') FROM DUAL UNION ALL
SELECT 'CURRENT_USERID', SYS_CONTEXT('USERENV', 'CURRENT_USERID') FROM DUAL UNION ALL
SELECT 'DB_DOMAIN', SYS_CONTEXT('USERENV', 'DB_DOMAIN') FROM DUAL UNION ALL
SELECT 'DB_NAME', SYS_CONTEXT('USERENV', 'DB_NAME') FROM DUAL UNION ALL
SELECT 'EXTERNAL_NAME', SYS_CONTEXT('USERENV', 'EXTERNAL_NAME') FROM DUAL UNION ALL
SELECT 'FG_JOB_ID', SYS_CONTEXT('USERENV', 'FG_JOB_ID') FROM DUAL UNION ALL
SELECT 'GLOBAL_CONTEXT_MEMORY', SYS_CONTEXT('USERENV', 'GLOBAL_CONTEXT_MEMORY') FROM DUAL UNION ALL
SELECT 'HOST', SYS_CONTEXT('USERENV', 'HOST') FROM DUAL UNION ALL
SELECT 'INSTANCE', SYS_CONTEXT('USERENV', 'INSTANCE') FROM DUAL UNION ALL
SELECT 'IP_ADDRESS', SYS_CONTEXT('USERENV', 'IP_ADDRESS') FROM DUAL UNION ALL
SELECT 'ISDBA', SYS_CONTEXT('USERENV', 'ISDBA') FROM DUAL UNION ALL
SELECT 'LANG', SYS_CONTEXT('USERENV', 'LANG') FROM DUAL UNION ALL
SELECT 'LANGUAGE', SYS_CONTEXT('USERENV', 'LANGUAGE') FROM DUAL UNION ALL
SELECT 'NETWORK_PROTOCOL', SYS_CONTEXT('USERENV', 'NETWORK_PROTOCOL') FROM DUAL UNION ALL
SELECT 'NLS_CALENDAR', SYS_CONTEXT('USERENV', 'NLS_CALENDAR') FROM DUAL UNION ALL
SELECT 'NLS_CURRENCY', SYS_CONTEXT('USERENV', 'NLS_CURRENCY') FROM DUAL UNION ALL
SELECT 'NLS_DATE_FORMAT', SYS_CONTEXT('USERENV', 'NLS_DATE_FORMAT') FROM DUAL UNION ALL
SELECT 'NLS_DATE_LANGUAGE', SYS_CONTEXT('USERENV', 'NLS_DATE_LANGUAGE') FROM DUAL UNION ALL
SELECT 'NLS_SORT', SYS_CONTEXT('USERENV', 'NLS_SORT') FROM DUAL UNION ALL
SELECT 'NLS_TERRITORY', SYS_CONTEXT('USERENV', 'NLS_TERRITORY') FROM DUAL UNION ALL
SELECT 'OS_USER', SYS_CONTEXT('USERENV', 'OS_USER') FROM DUAL UNION ALL
SELECT 'PROXY_USER', SYS_CONTEXT('USERENV', 'PROXY_USER') FROM DUAL UNION ALL
SELECT 'PROXY_USERID', SYS_CONTEXT('USERENV', 'PROXY_USERID') FROM DUAL UNION ALL
SELECT 'SESSION_USER', SYS_CONTEXT('USERENV', 'SESSION_USER') FROM DUAL UNION ALL
SELECT 'SESSION_USERID', SYS_CONTEXT('USERENV', 'SESSION_USERID') FROM DUAL UNION ALL
SELECT 'SESSIONID', SYS_CONTEXT('USERENV', 'SESSIONID') FROM DUAL UNION ALL
SELECT 'TERMINAL', SYS_CONTEXT('USERENV', 'TERMINAL') FROM DUAL;

Leave a Comment

Your email address will not be published. Required fields are marked *

*
*