• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql

USERENVPLSQL

USERENV Function in Oracle SQL – PLSQL

November 28, 2012 by techhoneyadmin

Oracle SQL / PLSQL USERENV function is used to get the information about the current Oracle Session.

Oracle SQL / PLSQL syntax for the USERENV function is:

SELECT USERENV (parameter)
FROM table_name;

The parameter is the value that is passed to the USERENV function.

The possible values of parameter are shown below:

Parameter Explanation
CLIENT_INFO Returns user session information stored using the DBMS_APPLICATION_INFO package
ENTRYID Available auditing entry identifier
INSTANCE The number of the current instance
ISDBA Returns TRUE if the user has DBA privileges. Else, returns FALSE.
LANG The ISO abbreviation for the language e.g. US
LANGUAGE The language, territory, and character of the session. In the following format:
language_territory.characterset.
SESSIONID The identifier of the auditing session e,g, 24000
TERMINAL The OS identifier of the current session

Example 1 of using the Oracle SQL USERENV function

 SELECT USERENV('SESSIONID')
FROM dual;

May return ‘24000’ or ‘23456’ or any other number


Example 2 of using the Oracle SQL USERENV function

 SELECT USERENV('LANGUAGE')
FROM dual;

May return ‘AMERICAN_AMERICA.WE8MSWIN1252’


Filed Under: function Tagged With: how to get the information about the current oracle sql session using USERENV function, How to use oracle sql plsql USERENV function with example, USERENVPLSQL, What is oracle sql plsql USERENV function

Copyright © 2025 · Parallax Pro on Genesis Framework · WordPress · Log in