The first parameter is ' USERENV ', is fixed, the second parameter is fixed, but is a multiple-select fixed, the optional value is as follows:
Select Sys_context (' USERENV ', ' Authentication_type ') the authentication type from the dual;--user select Sys_context (' USERENV ', ' Authentication_data ') from dual;--unknown select Sys_context (' USERENV ', ' bg_job_id ') from dual;--the current specified ID of the session is established for the Oracle daemon, Not then return nullselect sys_context (' USERENV ', ' Client_info ') from dual;--through Dbms_application_info package can store up to 64 bytes of user session information Select Sys_context (' USERENV ', ' Current_schema ') from the dual;--default schema will be treated as the current schema. When the ALTER session SET CURRENT_SCHEMA statement is used in the current session, its query return value will be changed by select Sys_context (' USERENV ', ' Current_schemaid ') from dual ;--Current schema of Idselect sys_context (' USERENV ', ' Current_User ') from dual;--current login user Select REPLACE (SUBSTR (' Sys_context (' USERENV ', ' Host '), 1,30), ' \ ', ': ') from dual;--current session host operating system name Select Sys_context (' USERENV ', ' Current_userid ') from dual;-- The currently logged-on user's idselect sys_context (' USERENV ', ' Db_domain ') from dual;--specifies initialization parameters for the domain of the database Select Sys_context (' USERENV ', ' db_ Name ') from the dual;--DB instance name select Sys_context (' USERENV ', ' ENTRYID ') the available audit identifier from dual;--. This option can no longer be used in distributed SQL statements. Use the USERENV keyword to set the Audit_trail initialization parameter to TRUE. SeleCT sys_context (' USERENV ', ' external_name ') from dual;--database user extension Select Sys_context (' USERENV ', ' fg_job_id ') from dual;- -Returns the job ID when this session is created by the client process. Otherwise, return nullselect sys_context (' USERENV ', ' INSTANCE ') from dual;--current DB instance labeled Idselect sys_context (' USERENV ', ' isdba ') From dual;--whether the current user is logged in as DBA, select Sys_context (' USERENV ', ' LANG ') from Dual;--iso to ' LANGUAGE ' abbreviation, the query has a parameter that is more than "LANGUAGE" Short Select Sys_context (' USERENV ', ' LANGUAGE ') from dual;--results for the storage language used by the current database, as in the above query meaning select Sys_context (' USERENV ', ' Network_protocol ') from dual;--Network protocol for Communication Select Sys_context (' USERENV ', ' Nls_calendar ') from dual;--current session use, GMT Select Sys_context (' USERENV ', ' nls_currency ') from dual;--localized currency symbol, such as the renminbi for ¥, the dollar symbol for $select sys_context (' USERENV ', ' Nls_date_format ') from dual;--currently used date format, general China for Dd-mon-rrselect Sys_context (' USERENV ', ' nls_date_language ') from dual;- -language that represents the date, such as Chinese Simplified Simplified chineseselect sys_context (' USERENV ', ' nls_territory ') from the dual;--database server area, such as China Chinaselect Sys_context (' USERENV ', ' Os_user ') from dual;--operating system user name Select Sys_context (' USERENV ', ' PRoxy_user ') from dual;--whether to use a proxy user. No return nullselect sys_context (' USERENV ', ' Proxy_userid ') from dual;--Proxy user idselect sys_context (' USERENV ', ' session_user ') From dual;--currently authenticated database user name Select Sys_context (' USERENV ', ' Session_userid ') from dual;--current authenticated database username Idselect sys_context (' USERENV ', ' SESSIONID ') from dual;--current session Idselect Sys_context (' USERENV ', ' TERMINAL ') from dual;--operating system user Group Select Sys_ Context (' USERENV ', ' ip_address ') from dual;--current session Host Ipselect Sys_context (' USERENV ', ' Host ') from dual;--current session host operating system name
Reference article: http://blog.csdn.net/kadwf123/article/details/8065673
Oracle Sys_context () function