Server information stored in global variables

Table 14-9 lists the global variables that contain miscellaneous information about Adaptive Server.

Table 14-9: Global variables containing Adaptive Server information

Global variable

Description

@@cis_version

Contains the date and version of Component Integration Services, if it is installed.

@@guestuserid

The guest user ID. The value is 2.

@@invaliduserid

The ID for an invalid user. The value is -1

@@max_connections

Contains the maximum number of simultaneous connections that can be made with Adaptive Server in the current computer environment. You can configure Adaptive Server for any number of connections less than or equal to the value of @@max_connection, using number of user connections configuration parameter.

@@mingroupid

Lowest group user ID. The lowest value is 16384.

@@minsuid

Minimum server user ID. The lowest value is -32768.

@@minuserid

Lowest user ID. The lowest value is -32768.

@@maxgroupid

Highest group user ID. The highest value is 1048576

@@maxuserid

The highest user ID. The highest value is 2147483647

@@probesuid

The probe user ID. The value is 2.

@@procid

Contains the stored procedure ID of the currently executing procedure.

@@servername

Contains the name of this Adaptive Server. Define a server name with sp_addserver, and then restart Adaptive Server.

@@spid

Contains the server process ID number of the current process.

@@thresh_hysteresis

Contains the decrease in free space required to activate a threshold. This amount, also known as the hysteresis value, is measured in 2K database pages. It determines how closely thresholds can be placed on a database segment.

@@timeticks

Contains the number of microseconds per tick. The amount of time per tick is machine-dependent.

@@version

Contains the date of the current release of Adaptive Server.

@@boottime

Displays the time at which Adaptive Server was started.