Configuration Functions
Configuration functions are very similar to system statistical functionsthey also return a single value and do not accept any parameters. Unlike statistical functions, however, the value returned from some of the configuration functions can be changed by altering one of the configuration parameters by using the SET statement, executing sp_configure, or sp_dboption.
The following table summarizes the configuration functions:
Configuration Function |
Returns |
@@DATEFIRST |
Value of SET DATEFIRST (notice that with DATEFIRST, 1 stands for Monday, 2 stands for Tuesday, and so on) |
@@DBTS |
Current value of TIMESTAMP data type within the current database |
@@LANGID |
Language id of the current language in use |
@@LANGUAGE |
Language name of the current language in use |
@@LOCK_TIMEOUT |
Lock timeout setting for current connection |
@@MAX_CONNECTIONS |
Maximum connections allowed on the current instance of SQL Server |
@@MAX_PRECISION |
Precision level used by default for NUMERIC and DECIMAL data types |
@@NESTLEVEL |
Nesting level of current procedure execution (incremented each time one stored procedure executes another) |
@@OPTIONS |
SET options for the current connection |
@@REMSERVER |
Name of the remote SQL Server from which a procedure is executed |
@@SERVERNAME |
Name of the local SQL Server |
@@SERVICENAME |
Name of the registry key under which SQL Server is running |
@@SPID |
Current server process id (spid) |
@@TEXTSIZE |
Current value of TEXSIZE option |
@@VERSION |
Date, version, and processor type for the current instance of SQL Server |