Oracle System Function - Oracle/PLSQL USERENV Function

This Oracle tutorial explains how to use the Oracle/PLSQL USERENV function.

The Oracle/PLSQL USERENV function returns information about the current Oracle session. It is recommended to use the sys_context function instead.


The syntax for the Oracle/PLSQL USERENV function is:

USERENV( parameter )

parameter is the value to return from the current Oracle session. The possible values are:

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