Oraclesys_context () function

Source: Internet
Author: User

Oraclesys_context () function

The first parameter is 'userenv', which is fixed. The second parameter is also fixed, but multiple options are fixed. The optional values are as follows:

 

Select sys_context ('userenv', 'authentication _ type') from dual; -- select sys_context ('userenv', 'authentication _ data') from dual; -- unknown select sys_context ('userenv', 'bg _ JOB_ID ') from dual; -- whether the session with the specified id is created by the oracle background program, otherwise, the returned nullselect sys_context ('userenv', 'client _ info') from dual; -- The dbms_application_info package can store user session information up to 64 bytes select sys_context ('userenv ', 'Current _ scheme') from dual; -- the default SCHEMA will be treated as the CURRENT sche Ma. When the alter session set CURRENT_SCHEMA statement is used in the current session, its query return value will be changed to select sys_context ('userenv', 'current _ schemaid') from dual; -- idselect sys_context ('userenv', 'current _ user') from dual; -- select REPLACE (SUBSTR (sys_context ('userenv ', 'host'),), '\', ':') from dual; -- select sys_context ('userenv', 'current _ userid ') from dual; -- the current Login User's idselect sys_context ('userenv', 'db _ DOMAIN ') from d Ual; -- specify the initialization parameter select sys_context ('userenv', 'db _ name') from dual for the database domain; -- select sys_context ('userenv ', 'entryid') from dual; -- available audit identifiers. You cannot use this option in Distributed SQL statements. The USERENV keyword must be used to set AUDIT_TRAIL's initialization parameter to true. Select sys_context ('userenv', 'external _ name') from dual; -- select sys_context ('userenv', 'fg _ JOB_ID ') from dual; -- returns the job id when this session is created by a client process. Otherwise, return nullselect sys_context ('userenv', 'instance') from dual; -- ID of the current database INSTANCE: idselect sys_context ('userenv', 'isdba ') from dual; -- whether the current user is logged on to select sys_context ('userenv', 'lang ') from dual; -- iso for short, the query parameter is shorter than "LANGUAGE". select sys_context ('userenv', 'language') from dual; -- the result is the storage LANGUAGE used by the current database, similar to the preceding query, select sys_context ('userenv', 'network _ Protocol') from dual; -- select sys_context ('userenv ',' NLS_CALENDAR ') from dual; -- for the current session, select sys_context ('userenv', 'nls _ CURRENCY') from dual; -- localized currency, for example, if the renminbi is $, the dollar sign is $ select sys_context ('userenv', 'nls _ DATE_FORMAT ') from dual; -- the current date format, generally, China is dd-mon-rrselect sys_context ('userenv', 'nls _ DATE_LANGUAGE ') from dual; -- indicates the date language, for example, SIMPLIFIED Chinese SIMPLIFIED CHINESEselect sys_context ('userenv ', 'nls _ TERRITORY ') from dual; -- region of the database server, for example, China's CHINAselect sys_context ('userenv', 'OS _ user') from dual; -- select sys_context ('userenv', 'proxy _ user') from dual; -- whether to use a PROXY USER. No nullselect sys_context ('userenv', 'proxy _ userid') from dual; -- proxy user idselect sys_context ('userenv', 'session _ user') from dual; -- currently authenticated database username select sys_context ('userenv', 'session _ userid') from dual; -- currently 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; -- Operating System name of the current Session HOST

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.