Global variables

Global variables are available by using the command:

select @@variable_name

Example 11

For example:

> select @@servername, @@version
> go

Table B-5 describes the available global variables:

Table B-5: Description of available global variables

Global variable

Description

@@autocommit

Returns the autocommit setting.

@@compatibility_level

Returns the current configured value for number_mode and truncate_text. truncate_text exists for compatibility only.

@@child_logfile

Returns the file specification of the errorlog. This variable has been replaced and is here for compatibility only. New applications should use @@errorlog instead.

@@client_csname

Returns the character set in use by the current connection.

@@connect_info

Returns the configured value for ‘connect_string’. For compatibility only.

@@connect_string

Returns the connect_string that the service is using.

@@default_charset

Returns the charset name used when the server was started.

@@errorlog

Returns the file specification of the errorlog.

@@max_users

Returns the max_users run value.

@@maxpagesize

Returns the maxpagesize run value.

@@language

Returns the language in use by the current connection.

@@ncharsize

Returns the size of an nchar character.

@@nls_lang

Returns the language, territory and character set in use by the Oracle connection.

@@oracle_version

Returns the version of Oracle to which a connection has been established.

@@servername

Returns the current server name to which the client has connected.

@@spid

Returns the process ID of the current connection.

@@sql_transform

Returns the current sql_transform setting.

@@textsize

Returns the current textsize value.

@@version

Returns the version string of the DirectConnect server.