September 2000
Intermediate to advanced
418 pages
11h 5m
English
| USERENV |
USERENV(option) |
Returns information about the current user.
option
Specifies the exact piece of information to be returned, and must be one of the values listed in Table 5-7. The value returned by this function is always a VARCHAR2 character string.
|
| Option | Description |
|---|---|
| ENTRYID | Returns an auditing entry identifier. The AUDIT_TRAIL initialization parameter must be TRUE for this option to be valid, and you cannot use this option in a distributed environment. |
| INSTANCE | Returns the instance identifier. |
| ISDBA | Returns TRUE or FALSE, depending on whether or not the ISDBA role is enabled. |
| LANG | Returns the abbreviation for the current ISO language. |
| LANGUAGE | Returns the user's current language and territory settings. |
| SESSIONID | Returns the auditing session identifier. The AUDIT_TRAIL initialization parameter must be TRUE for this option to be valid, and you cannot use this option in a distributed environment. |
| TERMINAL | Returns the current session's operating system terminal identifier. |
SQL> SELECT USERENV('INSTANCE'),USERENV('ISDBA') FROM dual;
USERENV('INSTANCE') USEREN
------------------- ------
1 FALSE
Read now
Unlock full access