Chapter 3: Querying and Setting Operating Values


Querying global variables

A user or client application can query a global variable to find the property and processing values that affect that client connection.

A global variable represents one of the following:

SQL transformation mode

A client application can query all global variables regardless of the SQL transformation mode in effect. However, the global variable statement must be the only statement in a request. For more information about SQL transformation modes, see “SQL transformation modes”.

Syntax

Global variables are preceded by two “at” (@@) symbols and are not case sensitive.

To query a global variable, issue a SQL statement in this form:

select @@variable_name

where variable_name is the name of the relevant global variable.

The access service returns the configuration property value or the processing information for the current connection.

For example, the SQL statement select @@Allocate returns the Allocate configuration property value of either connect or request.