Identifier functions v17
Identifier functions that information about the instance and session.
SYS_GUID
The SYS_GUID
function generates and returns a globally unique identifier. The identifier takes the form of 16 bytes of RAW
data. The SYS_GUID
function is based on the uuid-ossp
module to generate universally unique identifiers. The signature is:
Example
This example adds a column to the table EMP
, inserts a unique identifier, and returns a 16-byte RAW
value:
USERENV
The USERENV
function retrieves information about the current session. The signature is:
The parameter
specifies a value to return from the current session. The table shows the possible parameter
values.
Parameter | Description |
---|---|
ISDBA | Returns TRUE if the current user has DBA privileges, otherwise FALSE . |
LANGUAGE | The language, territory, and character set of the current session in the following format: language_territory.characterset |
LANG | The ISO abbreviation for the language name, a short name for the existing LANGUAGE parameter. |
SID | The current session identifier. |
TERMINAL | The current session's operating system terminal identifier. |
Examples
This example returns the ISDBA
parameter of the current session:
This example returns the LANG
parameter of the current session: