ORACLE USER 變數值

longwansheng發表於2011-01-21
select SYS_CONTEXT( 'USERENV', 'TERMINAL') terminal, --電腦名稱 SYS_CONTEXT( 'USERENV', 'LANGUAGE') language, --系統語言 SYS_CONTEXT( 'USERENV', 'SESSIONID') sessionid, -- SYS_CONTEXT( 'USERENV', 'INSTANCE') instance, SYS_CONTEXT( 'USERENV', 'ENTRYID') entryid, SYS_CONTEXT( 'USERENV', 'ISDBA') isdba, --是否DBA SYS_CONTEXT( 'USERENV', 'NLS_TERRITORY') nls_territory, --語言區 SYS_CONTEXT( 'USERENV', 'NLS_CURRENCY') nls_currency, --系統預定本幣 SYS_CONTEXT( 'USERENV', 'NLS_CALENDAR') nls_calendar, --日曆 SYS_CONTEXT( 'USERENV', 'NLS_DATE_FORMAT') nls_date_format, --日期格式 SYS_CONTEXT( 'USERENV', 'NLS_DATE_LANGUAGE') nls_date_language, --日期語系 SYS_CONTEXT( 'USERENV', 'NLS_SORT') nls_sort, SYS_CONTEXT( 'USERENV', 'CURRENT_USER') current_user, --訪問USER SYS_CONTEXT( 'USERENV', 'CURRENT_USERID') current_userid, --USER ID SYS_CONTEXT( 'USERENV', 'SESSION_USER') session_user, -- SYS_CONTEXT( 'USERENV', 'SESSION_USERID') session_userid, SYS_CONTEXT( 'USERENV', 'PROXY_USER') proxy_user, SYS_CONTEXT( 'USERENV', 'PROXY_USERID') proxy_userid, SYS_CONTEXT( 'USERENV', 'DB_DOMAIN') db_domain, SYS_CONTEXT( 'USERENV', 'DB_NAME') db_name, SYS_CONTEXT( 'USERENV', 'HOST') host, SYS_CONTEXT( 'USERENV', 'OS_USER') os_user, SYS_CONTEXT( 'USERENV', 'EXTERNAL_NAME') external_name, SYS_CONTEXT( 'USERENV', 'IP_ADDRESS') ip_address, SYS_CONTEXT( 'USERENV', 'NETWORK_PROTOCOL') network_protocol, SYS_CONTEXT( 'USERENV', 'BG_JOB_ID') bg_job_id, SYS_CONTEXT( 'USERENV', 'FG_JOB_ID') fg_job_id, SYS_CONTEXT( 'USERENV', 'AUTHENTICATION_TYPE') authentication_type, SYS_CONTEXT( 'USERENV', 'AUTHENTICATION_DATA') authentication_data from dual[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/92289/viewspace-1044982/,如需轉載,請註明出處,否則將追究法律責任。

相關文章