SYS_SESSION system application context

The SYS_SESSION context shows the default predefined application context, which provides session-specific pairs of attributes and values. The syntax for using the context is:

select list_appcontext ("SYS_SESSION", "*")

Then:

select get_appcontext ("SYS_SESSION", "<attribute>")
Table 6-4: SYS_SESSION attributes and values

Attribute

Value

username

Login name

hostname

Host name from which the client has connected

applname

Name of the application as set by the client

suserid

User ID of the user in the current database

groupid

Group ID of the user in the current database

dbid

ID of the user’s current database

dbname

Current database

spid

Server process ID

proxy_suserid

The server user ID of the proxy

client_name

Client name set by the middle-tier application, using set client_name

client_applname

Client application name set by the middle-tier application, using set client_applname

client_hostname

Client host name set by the middle-tier application, using set client_hostname

language

Current language the client is using by default or after using set language (@@language)

character_set

Character set the client is using (@@client_csname)

dateformat

Date expected by the client, set using set dateformat

is_showplan_on

Returns YES if set showplan is on, NO if it is off

is_noexec_on

Returns YES if set no exec is on, NO if it is off