SQL Server Performance Forum – Threads Archive
Calculate the current load of an SQL Server
Hi there! Is there a way to calculate the current load of an SQL Server from within a query? Cheers,Ingmar
You can take of DMV (Dynamic Management Views) in SQL 2005 and books online is best resource for you. Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing.
As Satya mentioned you use DMVs but what kind of load you talking about? Mohammed U.
This ia about a tool that allows the customer to build queries of arbitrary complexity. DBA is worried that the queries will become so complex that they will lock down the SQL Server. So I figured I need a) a way to determine a measure for the query’s complexity and b) a measure of the SQL Server’s current work load. Combined, the two results could lead to a decision whether to fire or to dump the query. All this has to be integrated into the tool, of course, so it has to happen implicitly. -Ingmar
try looking at the execution plan and total estimated,
while not perfect by a long shot,
you may as start with what SQL already gives you see the MS paper on this,
http://msdn2.microsoft.com/en-us/library/ms345130.aspx
]]>