René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

sys_context [Oracle]

sys_context(namespace_string, parameter_string)
sys_context(namespace_string, parameter_string, len)

Current session

sys_context can for example be used to find out which row in v$session is the "current" session:
select sid from v$session where audsid=sys_context('userenv','SESSIONID');

Attributes for userenv

  • action
  • audited_cursorid
  • authenticated_identity
  • authentication_data
  • authentication_method
  • authentication_type
    deprecated
  • bg_job_id
  • client_identifier
  • client_info
  • current_bind
  • current_schema
  • current_schema_id
  • current_sql (also current_sqln for n 1 .. 7)
  • current_sql_length
  • current_user
    Deprecated in favor of session_user
  • current_userid
    Deprecated in favor of session_userid
  • db_domain
  • db_name
  • db_unique_name
  • entryid
  • enterprise_identity
  • external_name
    deprecated
  • fg_job_id
  • global_context_memory
  • global_uid
  • host
  • identification_type
  • instance
  • instance_name
  • ip_address
    see also utl_inaddr.get_host_name
  • isdba
  • lang
    abbreviation for language
  • 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_user_id
  • server_host
  • service_name
  • session_user
  • session_userid
  • sessionid
  • sid
    See also dbms_support.mysid
  • statementid
  • terminal

Links

See also create context.