{"name":"Percentage of blocked connections","description":"<p>This metric reports the number of connections that are currently blocked, divided by the total count of current connections.<\/p>\r\n\r\n<p>Most well-balanced SQL Servers will have some degree of blocking. This metric attempts to measure the impact of lead blocking queries against other queries. Higher values indicate that many connections are being blocked, and queries should be tuned to reduce the amount of contention.<\/p>\r\n\r\n<p>Guideline values: Higher percentage values indicate more blocking. This number will should change with each collection as queries are being run against the server. Trends are more important than spikes, although spikes can help you identify candidates for query tuning.<\/p>\r\n\r\n<p>Possible solutions: If high values are noticed, query plans should be examined for tuning opportunities to reduce blocks. Keeping transactions short on well-indexed tables can reduce blocking contention; blocking can also be reduced by rewriting poorly defined queries (e.g., queries with unnecessary joins).<\/p>\r\n\r\n<p>For more information, see <a href=\"http:\/\/support.microsoft.com\/kb\/224453\">INF: Understanding and resolving SQL Server blocking problems<\/a>.<\/p>","tsql":"SELECT  CAST(SUM(CASE WHEN blocking_session_id <> 0 THEN 100.00\r\n                      ELSE 0.00\r\n                 END) \/ COUNT(*) AS NUMERIC(10, 2))\r\nFROM    sys.dm_exec_requests\r\nWHERE database_id = DB_ID();","instances":true,"frequency":60,"databases":{"mode":0},"rateofchange":false,"metricenabled":true,"noalertremark":"An alert is not required","alertdescription":"Alert description goes here","aboveorbelow":"above","collections":3,"alertenabled":true,"_thresholds_high":{"selected":true,"value":800},"_thresholds_medium":{"selected":true,"value":500},"_thresholds_low":{"selected":true,"value":100},"targetentitytype":0}