SYSINFO

The SYSINFO function provides information about the Oracle user ID for the current session.

Return Value

TEXT

Syntax

SYSINFO (keyword)

where keyword is one of the following:

USER
ROLES
PROFILES
HOSTNAME
OSUSER
INSTNAME
PID
PROGNAME
CHOSTNAME
COSUSER
TERMNAME

Parameters

USER

Returns a TEXT value that indicates the user ID under which the Oracle Database session is running which is the same value that is returned by USERID.

ROLES

Returns a multiline TEXT value that lists the roles that apply to the user ID of the session.

PROFILES

Returns a multiline TEXT value that lists the profiles that apply to the user ID of the session.

OSUSER

Returns TEXT value that indicates the operating system user name under which the Oracle Database server is running.

INSTNAME

Returns a TEXT value that is the instance name of the Oracle Database server.

PID

Returns a TEXT value that is the operating system id number of your Oracle Database session.

HOSTNAME

Returns a TEXT value that is the host name of the Oracle Database server.

PROGNAME

Returns a TEXT value that identifies the client that is connecting to the database.

CHOSTNAME

Returns a TEXT value that is the host name of the client.

COSUSER

Returns a TEXT value that is the operating system user name of the client.

TERMNAME

Returns a TEXT value that is the terminal name of the client.

Examples

Example 8-127 Obtaining the User ID

You can use the SYSINFO function to obtain the user of the current session.

SHOW SYSINFO(USER)

produces output like the following.

Scott