獲取MSSQL2000服務器調用次數的最簡單方法

[英]Simplest way to get the number of calls to an MSSQL2000 Server


Does anyone know how one can get the total number of calls to an MSSQL2000 server during a specified time, let’s say 24 hours?

有誰知道如何在指定的時間內獲得MSSQL2000服務器的總呼叫數量,比方說24小時?

We want figures of how many calls our production machine gets per day, but we can’t find any good tools/strategies for this.

我們想要了解我們的生產機器每天撥打多少電話的數字,但我們找不到任何好的工具/策略。

Best regards Fredrik

最好的問候Fredrik

3 个解决方案

#1


I think using SQL Profiler here is overkill in this situation, particularly as it can create a substantial load on the server depending on what you trace. SQL Server exposes the raw values used for its performance counters via the sysperfinfo system table; you should just be able to run this query once each day and subtract the values to work out how many SQL requests you received for the day:

我認為在這種情況下使用SQL事件探查器是過度的,特別是因為它可以根據你追蹤的內容在服務器上產生大量負載。 SQL Server通過sysperfinfo系統表公開用於其性能計數器的原始值;您應該能夠每天運行一次此查詢,並減去這些值以計算出當天收到的SQL請求數:

SELECT cntr_value 
FROM sysperfinfo 
WHERE object_name = 'SQLServer:SQL Statistics' 
AND counter_name = 'Batch Requests/sec'

This will obviously only work if the server is up for the whole day; restarting will reset the number.

這顯然只有服務器一整天才能運行;重啟將重置該號碼。

#2


You could use SQL Profiler?

你可以使用SQL Profiler嗎?

http://technet.microsoft.com/en-us/library/aa173918(SQL.80).aspx
http://www.sqlteam.com/article/sql-server-2000-performance-tuning-tools
http://support.microsoft.com/kb/325263

http://technet.microsoft.com/en-us/library/aa173918(SQL.80).aspx http://www.sqlteam.com/article/sql-server-2000-performance-tuning-tools http:/ /support.microsoft.com/kb/325263

#3


I sloved this another way (all calls are "routed" thru an IIS cluster and I where able to analyze their logs).

我用另一種方式解決了(所有調用都通過IIS集群“路由”,我可以分析他們的日志)。

Thanx!


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2009/01/13/729cbe8b3418d803a502611d27cad2b2.html



 
粤ICP备14056181号  © 2014-2020 ITdaan.com