2013-12-19 118 views
2

我想知道是否有任何查詢知道SQL Server的狀態。查詢查找SQL Server的狀態

在MySQL中,我們可以使用SHOW STATUS。它會返回狀態..

mysql> SHOW STATUS; 
+--------------------------+------------+ 
| Variable_name   | Value  | 
+--------------------------+------------+ 
| Aborted_clients   | 0   | 
| Aborted_connects   | 0   | 
| Bytes_received   | 155372598 | 
| Bytes_sent    | 1176560426 | 
| Connections    | 30023  | 
| Created_tmp_disk_tables | 0   | 
| Created_tmp_tables  | 8340  | 
| Created_tmp_files  | 60   | 
| Open_tables    | 1   | 
| Open_files    | 2   | 
| Open_streams    | 0   | 
| Opened_tables   | 44600  | 
| Questions    | 2026873 | 
| Table_locks_immediate | 1920382 | 
| Table_locks_waited  | 0   | 
| Threads_cached   | 0   | 
| Threads_created   | 30022  | 
| Threads_connected  | 1   | 
| Threads_running   | 1   | 
| Uptime     | 80380  | 
+--------------------------+------------+ 

這樣,所有查詢的SQL Server ..?

+0

檢查了這一點:http://dba.stackexchange.com/questions/13975/how-to-check-the-status-of-sql-server – Ares

+0

可以檢查SYS爲這種事情:sys.object,sys.databases,sys.dm_exec_requests等 – HellBaby

+0

http://msdn.microsoft.com/en-us/library/ms177648%28v=sql.90%29.aspx –

回答

1

您需要使用不同的SYS電學性能的研究sys.databases中,sys.sysprocesses等

0

mysqladmin status時顯示短服務器狀態消息。

C:\Users\Dom>C:/xampp/mysql/bin/mysqladmin -uroot status 
Uptime: 32 Threads: 1 Questions: 2 Slow queries: 0 Opens: 70 Flush tables: 
1 Open tables: 63 Queries per second avg: 0.062