Global variables of SQL Server 2000

Source: Internet
Author: User
Tags time in milliseconds

· @ Connections

Returns the number of connections that have been connected to or attempted to connect to SQL Server since the last time SQL Server was started.

· @ Cpu_busy

Returns the CPU time in milliseconds since the last time SQL Server was started.

· @ Cursor_rows

Returns the number of rows of valid data rows in the opened cursor.

· @ Datefirst

Returns the value of the datafirst parameter set datefirst assigned by the set datefirst command. The command specifies the day of the week on the first day of each week.

· @ Dbts

The timestamp value of the current database must be unique in the database.

· @ Error

Returns the error of executing a Transact-SQL statement.Code

· @ Fetch_status

Returns the status value of the last fetch statement.

· @ Identity

Returns the column value of the ID column of the last inserted row.

· @ Idle

Returns the unit of time (in milliseconds) for the CPU to be empty and closed since the last time SQL Server was started.

· @ Io_busy

Returns the time consumed by the CPU to perform input/output operations since the last time SQL Server was started, in milliseconds.

· @ Langid

Returns the current language ID.

· @ Language

Returns the name of the currently used language.

· @ Lock_timeout

Returns the length of the lock wait time for the current session, in milliseconds.

· @ Max_connections

Returns the maximum number of connections allowed to connect to SQL Server.

· @ Max_precision

Returns the precision of the decimal and numeric data types.

· @ Nestlevel

Returns the initial nested Level of the currently executed stored procedure. The value is 0.

· @ Options

Returns information about the current set option.

· @ Pack_received

Returns the number of input packages read by SQL Server over the network.

· @ Pack_sent

Returns the number of output packets written by SQL Server to the network.

· @ Packet_errors

Number of network packet errors returned

· @ Procid

Returns the ID of the current stored procedure.

· @ Remserver

Returns the name of the Remote SQL Server database server.

· @ Rowcount

Returns the number of rows affected by the last statement.

· @ Servername

Returns the name of the database server running SQL Server locally.

@ Servicename

Returns the service status in which SQL server is running, such as MSSQLServer MSDTC SQLSERVERAGENT.

@ Spid

Returns the server processing id processed by the current user.

· @ Textsize

Return the textsize option value of the Set statement. The set statement defines the maximum length of the text or image data type in the SELECT statement. The basic unit is byte.

@ Timeticks

Returns the number of microseconds per clock.

· @ Total_errors

Returned disk read/write errors

· @ Total_read

Returns the number of disk read operations.

· @ Total_write

Returns the number of disk write operations.

· @ Trancount

Returns the number of activated transactions in the current connection.

· @ Version

Returns the date version of the current SQL Server processor.


 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.