This section lists the global variables and their brief descriptions for Adaptive Server. See Reference Manual: Building Blocks for more information.
Global variable |
Definition |
---|---|
@@authmech |
A read-only variable that indicates the mechanism used to authenticate the user. |
@@bootcount |
Returns the number of times an Adaptive Server installation has been booted. |
@@boottime |
Returns the date and time Adaptive Server was last booted. |
@@bulkarraysize |
Component Integration Services – returns the number of rows to be buffered in local server memory before being transferred using the bulk copy interface. |
@@bulkbatchsize |
Component Integration Services – returns the number of rows transferred to a remote server via select into proxy_table using the bulk interface. |
@@char_convert |
Returns 0 if character set conversion is not in effect. Returns 1 if character set conversion is in effect. |
@@cis_rpc_handling |
Component Integration Services – returns 0 if cis rpc handling is off. Returns 1 if cis rpc handling is on. |
@@cis_version |
Returns the date and version of Component Integration Services. |
@@client_csexpansion |
Returns the expansion factor used when converting from the server character set to the client character set. |
@@client_csid |
Returns -1 if the client character set has never been initialized. Returns the client character set ID from syscharsets for the connection if the client character set has been initialized. |
@@client_csname |
Returns NULL if client character set has never been initialized; returns the name of the character set for the connection if the client character set has been initialized. |
@@cmpstate |
Returns the current mode of Adaptive Server in a high availability environment. |
@@connections |
Returns the number of user logins attempted. |
@@cpu_busy |
Returns the number of seconds, in CPU time, that Adaptive Server's CPU was performing Adaptive Server work. |
@@cursor_rows |
A global variable designed specifically for scrollable cursors. Displays the total number of rows in the cursor result set. |
@@curloid |
Either no cursors are open, no rows qualify for the last opened cursor, or the last open cursor is closed or deallocated. |
@@datefirst |
Set using set datefirst n where n is a value between 1 and 7. |
@@dbts |
Returns the timestamp of the current database. |
@@error |
Returns the error number most recently generated by the system. |
@@errorlog |
Returns the full path to the directory in which the Adaptive Server errorlog is kept, relative to $SYBASE directory (%SYBASE% on NT). |
@@failedoverconn |
Returns a value greater than 0 if the connection to the primary companion has failed over and is executing on the secondary companion server. |
@@fetch_status |
Returns values: 0: fetch operation successful; –1: fetch operation unsuccessful; –2: value reserved for future use. |
@@guestuserid |
Returns the ID of the guest user. |
@@hacmpservername |
Returns the name of the companion server in a high availability setup. |
@@haconnection |
Returns a value greater than 0 if the connection has the failover property enabled. |
@@heapmemsize |
Returns the size of the heap memory pool, in bytes. |
@@identity |
Returns the most recently generated IDENTITY column value. |
@@idle |
Returns the number of seconds, in CPU time, that Adaptive Server has been idle. |
@@invaliduserid |
Returns a value of -1 for an invalid user ID. |
@@io_busy |
Returns the number of seconds in CPU time that Adaptive Server has spent doing input and output operations. |
@@isolation |
Returns the value of the session-specific isolation level (0, 1, or 3) of the current Transact-SQL program. |
@@kernel_addr |
Returns the starting address of the first shared memory region that contains the kernel region. |
@@kernel_size |
Returns the size of the kernel region that is part of the first shared memory region. |
@@langid |
Returns the server-wide language ID of the language in use, as specified in syslanguages.langid. |
@@language |
Returns the name of the language in use, as specified in syslanguages.name. |
@@lock_timeout |
Set using set lock wait n. Returns the current lock_timeout setting, in milliseconds. |
@@maxcharlen |
Returns the maximum length, in bytes, of a character in Adaptive Server's default character set. |
@@max_connections |
Returns the maximum number of simultaneous connections that can be made with Adaptive Server in the current computer environment. |
@@maxgroupid |
Returns the highest group user ID. The highest value is 1048576. |
@@maxpagesize |
Returns the server's logical page size. |
@@max_precision |
Returns the precision level used by decimal and numeric datatypes set by the server. |
@@maxspid |
Returns maximum valid value for the spid. |
@@maxsuid |
Returns the highest server user ID. The default value is 2147483647. |
@@maxuserid |
Returns the highest user ID. The highest value is 2147483647. |
@@mempool_addr |
Returns the global memory pool table address. |
@@min_poolsize |
Returns the minimum size of a named cache pool, in kilobytes |
@@mingroupid |
Returns the lowest group user ID. The lowest value is 16384. |
@@minspid |
Returns 1, which is the lowest value for spid. |
@@minsuid |
Returns the minimum server user ID. The lowest value is -32768. |
@@minuserid |
Returns the lowest user ID. The lowest value is -32768. |
@@monitors_active |
Reduces the number of messages displayed by sp_sysmon. |
@@ncharsize |
Returns the maximum length, in bytes, of a character set in the current server default character set. |
@@nestlevel |
Returns the current nesting level. |
@@nodeid |
Returns the current installation's 48-bit node identifier. |
@@optgoal |
Returns the current optimization goal setting for query optimization |
@@options |
Returns a hexadecimal representation of the session's set options. |
@@opttimeout |
Returns the current optimization timeout limit setting for query optimization |
@@pack_received |
Retruns the number of input packets read by Adaptive Server. |
@@pack_sent |
Returns the number of output packets written by Adaptive Server. |
@@packet_errors |
Returns the number of errors detected by Adaptive Server while reading and writing packets. |
@@pagesize |
Returns the server’s virtual page size. |
@@parallel_degree |
Returns the current maximum parallel degree setting. |
@@probesuid |
Returns a value of 2 for the probe user ID. |
@@procid |
Returns the stored procedure ID of the currently executing procedure. |
@@recovery_state |
Indicates whether Adaptive Server is in recovery. |
@@repartition_degree |
Returns the current dynamic repartitioning degree setting. |
@@resource_granularity |
Returns the maximum resource usage hint setting for query optimization |
@@rowcount |
Returns the number of rows affected by the last query. |
@@scan_parallel_degree |
Returns the current maximum parallel degree setting for nonclustered index scans. |
@@servername |
Returns the name of Adaptive Server. |
@@setrowcount |
Returns the current value for set rowcount. |
@@shmem_flags |
Returns the shared memory region properties. This variable is for internal use. |
@@spid |
Returns the server process ID of the current process. |
@@sqlstatus |
Returns status information (warning exceptions) resulting from the execution of a fetch statement. |
@@ssl_ciphersuite |
Returns NULL if SSL is not used on the current connection; otherwise, it returns the name of the cipher suite you chose during the SSL handshake on the current connection. |
@@stringsize |
Returns the amount of character data returned from a toString() method. |
@@tempdbid |
Returns a valid temporary database ID (dbid) of the session’s assigned temporary database. |
@@textcolid |
Returns the column ID of the column referenced by @@textptr. |
@@textdataptnid |
Returns the partition ID of a text partition containing the column referenced by @@textptr. |
@@textdbid |
Returns the database ID of a database containing an object with the column referenced by @@textptr. |
@@textobjid |
Returns the object ID of an object containing the column referenced by @@textptr. |
@@textptnid |
Returns the partition ID of a data partition containing the column referenced by @@textptr. |
@@textptr |
Returns the text pointer of the last text, unitext, or image column inserted or updated by a process (Not the same as the textptr function). |
@@textptr_parameters |
Returns 0 if the current status of the textptr_parameters configuration parameter is off. Returns 1 if the current status of the textptr_parameters if on. |
@@textsize |
Returns the limit on the number of bytes of text, unitext, or image data a select returns. |
@@textts |
Returns the text timestamp of the column referenced by @@textptr. |
@@thresh_hysteresis |
Returns the decrease in free space required to activate a threshold. |
@@timeticks |
Returns the number of microseconds per tick. The amount of time per tick is machine-dependent. |
@@total_errors |
Returns the number of errors detected by Adaptive Server while reading and writing. |
@@total_read |
Returns the number of disk reads by Adaptive Server. |
@@total_write |
Returns the number of disk writes by Adaptive Server. |
@@tranchained |
Returns 0 if the current transaction mode of the Transact-SQL program is unchained. Returns 1 if the current transaction mode of the Transact-SQL program is chained. |
@@trancount |
Returns the nesting level of transactions in the current user session. |
@@transactional_rpc |
Returns 0 if RPCs to remote servers are transactional. Returns 1 if RPCs to remote servers are not transactional. |
@@transtate |
Returns the current state of a transaction after a statement executes in the current user session. |
@@unicharsize |
Returns 2, the size of a character in unichar. |
@@version |
Returns the date, version string, and so on of the current release of Adaptive Server. |
@@version_number |
Returns the whole version of the current release of Adaptive Server as an integer |
@@version_as_integer |
Returns the number of the last upgrade version of the current release of Adaptive Server as an integer. |
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |