<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DEIARHo9fyp7ImA9WhRUFU8.&quot;"><id>tag:blogger.com,1999:blog-2328222207349876984</id><updated>2012-01-25T15:22:25.467-06:00</updated><category term="datatypes" /><category term="errormessage" /><category term="tfs" /><category term=".net3.5" /><category term="tsql" /><category term="brssug" /><category term="ssas" /><category term="servername" /><category term="ssms" /><category term="normalization" /><category term="sqldenali" /><category term="sharepoint" /><category term="downloads" /><category term="excel" /><category term="dta" /><category term="winmerge" /><category term="powershell" /><category term="nolock" /><category term="defaultconstraint" /><category term="sql2008r2sp1" /><category term="perd" /><category term="readuncommitted" /><category term="cerd" /><category term="script" /><category term="windows" /><category term=".net" /><category term="performance" /><category term="review" /><category term="defrag" /><category term="visualstudio" /><category term="float" /><category term="2008" /><category term="cpu" /><category term="backup" /><category term="humor" /><category term="xevents" /><category term="schemacompare" /><category term="xml" /><category term="linq" /><category term="ssis script" /><category term="resourcegovernor" /><category term="tinyint" /><category term="iis" /><category term="threads" /><category term="dmv" /><category term="heap" /><category term="isoweek" /><category term="security" /><category term="cdc" /><category term="azure" /><category term="dts" /><category term="usergroup" /><category term="multithreading" /><category term="Nonsql" /><category term="size" /><category term="visio" /><category term="cube" /><category term="sql2012" /><category term="lambda" /><category term="instance" /><category term="join" /><category term="ssis" /><category term="int" /><category term="oracle" /><category term="slidedeck" /><category term="isolationlevel" /><category term="teched" /><category term="ssrs" /><category term="houstontechfest" /><category term="sqlsat28" /><category term="sql" /><category term="twitter" /><category term="sqlsaturday" /><category term="microsoft" /><category term="index" /><category term="sqlbi" /><category term="sp3" /><category term="partition" /><category term="columnstore" /><category term="information_schema" /><category term="erd" /><category term="sql 2008" /><category term="sqlsat64" /><category term="deadlock" /><category term="replication" /><category term="google" /><category term="batonrouge" /><title>SQL Tact</title><subtitle type="html">&lt;b&gt;pointers, solutions and scripts for the SQL DBA&lt;br&gt;Not intended to replace common sense&lt;/b&gt;</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.sqltact.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.sqltact.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default?start-index=6&amp;max-results=5&amp;redirect=false&amp;v=2" /><author><name>w</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>76</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>5</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/SqlTact" /><feedburner:info uri="sqltact" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DEIARHozeSp7ImA9WhRUFU8.&quot;"><id>tag:blogger.com,1999:blog-2328222207349876984.post-6005473501491288394</id><published>2012-01-21T09:55:00.001-06:00</published><updated>2012-01-25T15:22:25.481-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-25T15:22:25.481-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="readuncommitted" /><category scheme="http://www.blogger.com/atom/ns#" term="tsql" /><category scheme="http://www.blogger.com/atom/ns#" term="isolationlevel" /><category scheme="http://www.blogger.com/atom/ns#" term="nolock" /><title>Actual Emails: Is "NOLOCK is the epitome of evil?"</title><content type="html">&lt;div&gt;&lt;div id="divRpF598261" style="direction: ltr;"&gt;&lt;span style="color: black; font-family: Tahoma; font-size: x-small;"&gt;&lt;b&gt;Sent:&lt;/b&gt;&amp;nbsp;Friday, January 20, 2012 10:30 AM&lt;br /&gt;
&lt;b&gt;To:&lt;/b&gt;&amp;nbsp;William Assaf&lt;br /&gt;
&lt;b&gt;Subject:&lt;/b&gt;&amp;nbsp;dba has a question&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;William,&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;Can you send me references to support my contention that NOLOCK is the epitome of evil?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;That is, that it can return invalid and/or unrelated data.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;He is still suggesting that folks use NOLOCK (rather than READPAST).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;We have to work around other poorly written queries, so some of these are inevitable.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;Thanks,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;&lt;i&gt;[my colleague's name redacted to protect the innocent]&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;--------------------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;The basic danger is that with NOLOCK, the data can change out from  underneath the query while it is in progress.  This doesn't require the query to  run for a long time, it could happen even on simple queries.  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;He should know that SQL doesn't read data out of a database  like an excel spreadsheet, it reads a series of addresses all across a hard  disk.  Without even a shared read lock, the data in those addresses can change  out from underneath a query using NOLOCK or READ UNCOMMITTED (same thing,  different keywords.)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;The more appropriate and sometimes-used term for this  isolation level is CHAOS.  You could (and there are labs out there to prove  this) end up with blank data, malformed bytes, or worst - &lt;em&gt;wrong &lt;/em&gt;data.   The likelyhood is low admittedly, but the potential for data corruption is  misreporting is not something that should be invited.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;I would be strongly against using this isolation level on  any query that could be attached or provide source data from an  update/insert/delete statement, which would commit the bad data.  Most select  statements are the basis for some update, unfortunately.  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;Perhaps on a query that is used frequently on a  constantly-refreshing dashboard would be a situation in which NOLOCK would be  appropriate.  But then, there are better, safer alternatives like SNAPSHOT  isolation mode, or better architectural decisions to make data more available  for read-heavy queries.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;Good examples and info here:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://blogs.msdn.com/b/craigfr/archive/2007/06/12/query-failure-with-read-uncommitted.aspx"&gt;&lt;span style="font-family: inherit;"&gt;http://blogs.msdn.com/b/craigfr/archive/2007/06/12/query-failure-with-read-uncommitted.aspx&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://sqlblogcasts.com/blogs/tonyrogerson/archive/2006/11/10/1280.aspx"&gt;&lt;span style="font-family: inherit;"&gt;http://sqlblogcasts.com/blogs/tonyrogerson/archive/2006/11/10/1280.aspx&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://summit2009.sqlpass.org/Agenda/PrePostConferenceSessions/BenGanQA.aspx"&gt;&lt;span style="font-family: inherit;"&gt;http://summit2009.sqlpass.org/Agenda/PrePostConferenceSessions/BenGanQA.aspx&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://blogs.msdn.com/b/sqlcat/archive/2007/02/01/previously-committed-rows-might-be-missed-if-nolock-hint-is-used.aspx"&gt;&lt;span style="font-family: inherit;"&gt;http://blogs.msdn.com/b/sqlcat/archive/2007/02/01/previously-committed-rows-might-be-missed-if-nolock-hint-is-used.aspx&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;&lt;a href="http://blogs.msdn.com/b/davidlean/archive/2009/04/06/sql-server-nolock-hint-other-poor-ideas.aspx"&gt;http://blogs.msdn.com/b/davidlean/archive/2009/04/06/sql-server-nolock-hint-other-poor-ideas.aspx&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;-William&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: tahoma;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family: tahoma;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div dir="ltr"&gt;&lt;span style="color: black; font-family: Tahoma; font-size: x-small;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div id="divRpF598261" style="direction: ltr;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2328222207349876984-6005473501491288394?l=www.sqltact.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FA4bxMnPTW3HXuag4Jh_Gvpb0ww/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FA4bxMnPTW3HXuag4Jh_Gvpb0ww/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FA4bxMnPTW3HXuag4Jh_Gvpb0ww/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FA4bxMnPTW3HXuag4Jh_Gvpb0ww/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=SfRywWfmdfg:wJ169Cdc9XA:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=SfRywWfmdfg:wJ169Cdc9XA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/SqlTact/~4/SfRywWfmdfg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqltact.com/feeds/6005473501491288394/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqltact.com/2012/01/actual-emails-is-nolock-is-epitome-of.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/6005473501491288394?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/6005473501491288394?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SqlTact/~3/SfRywWfmdfg/actual-emails-is-nolock-is-epitome-of.html" title="Actual Emails: Is &quot;NOLOCK is the epitome of evil?&quot;" /><author><name>w</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://www.sqltact.com/2012/01/actual-emails-is-nolock-is-epitome-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QBRHgyeyp7ImA9WhRUEUs.&quot;"><id>tag:blogger.com,1999:blog-2328222207349876984.post-6518071520887741870</id><published>2011-12-16T16:19:00.001-06:00</published><updated>2012-01-21T09:55:55.693-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-21T09:55:55.693-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="dmv" /><title>View execution plan for a sproc in the wild</title><content type="html">Got stored procedure problems? &amp;nbsp;I feel sorry for you son.&lt;br /&gt;
&lt;br /&gt;
Here's a quick query to pull the &lt;i&gt;cached &lt;/i&gt;execution plan out of memory. &lt;br /&gt;
&lt;br /&gt;
I &lt;i&gt;italicized&lt;/i&gt;&amp;nbsp;cached because it's not going to stay there forever.&lt;br /&gt;
&lt;br /&gt;
I used this query to find the execution plan of a stored proc that had been running in a SQL job. &amp;nbsp;Instead of pulling down the sproc and trying to estimate the query plan, I chose to see what the cached plan looked like.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;select&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt; eqp&lt;/span&gt;&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;.&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;query_plan &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;from&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: green; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;sys&lt;/span&gt;&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;.&lt;/span&gt;&lt;span style="color: green; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;objects&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt; o&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;inner&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;join&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: green; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;sys&lt;/span&gt;&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;.&lt;/span&gt;&lt;span style="color: green; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;dm_exec_procedure_stats&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt; eps &lt;/span&gt;&lt;span style="color: blue; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;on&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt; eps&lt;/span&gt;&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;.&lt;/span&gt;&lt;span style="color: magenta; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;object_id&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt; o&lt;/span&gt;&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;.&lt;/span&gt;&lt;span style="color: magenta; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;object_id&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;cross&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;apply&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: green; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;sys&lt;/span&gt;&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;.&lt;/span&gt;&lt;span style="color: green; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;dm_exec_query_plan&lt;/span&gt;&lt;span style="color: blue; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;(&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;eps&lt;/span&gt;&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;.&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;plan_handle&lt;/span&gt;&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;)&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt; eqp &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;where&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt; o&lt;/span&gt;&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;.&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;name &lt;/span&gt;&lt;span style="color: grey; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;'PoorPerformingProcedure'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: red; font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Run this in SQL Management Studio and click on the "hyperlinked" XML in the results window, and you'll find the execution plan displaying just like it would if you'd hit Ctrl-L.&lt;br /&gt;
&lt;br /&gt;
What else can you do with this?&lt;br /&gt;
&lt;br /&gt;
How about finding the top 10 longest running execution plans of stored procs in cache?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;select&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;top&lt;/span&gt; 10 eqp&lt;span style="color: grey;"&gt;.&lt;/span&gt;query_plan&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;from&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: green;"&gt;sys&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: green;"&gt;objects&lt;/span&gt; o&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;inner&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: grey;"&gt;join&lt;/span&gt; &lt;span style="color: green;"&gt;sys&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: green;"&gt;dm_exec_procedure_stats&lt;/span&gt; eps &lt;span style="color: blue;"&gt;on&lt;/span&gt; eps&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: magenta;"&gt;object_id&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; o&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: magenta;"&gt;object_id&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;cross&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: grey;"&gt;apply&lt;/span&gt; &lt;span style="color: green;"&gt;sys&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: green;"&gt;dm_exec_query_plan&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;eps&lt;span style="color: grey;"&gt;.&lt;/span&gt;plan_handle&lt;span style="color: grey;"&gt;)&lt;/span&gt; eqp &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;order&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;by&lt;/span&gt;&amp;nbsp;eps.total_worker_time &lt;span style="color: blue;"&gt;desc&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How about the top 10 most-frequently executed stored procedure plans in cache, in the current database?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;select&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;top&lt;/span&gt; 10 eqp&lt;span style="color: grey;"&gt;.&lt;/span&gt;query_plan&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;from&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: green;"&gt;sys&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: green;"&gt;objects&lt;/span&gt; o&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;inner&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: grey;"&gt;join&lt;/span&gt; &lt;span style="color: green;"&gt;sys&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: green;"&gt;dm_exec_procedure_stats&lt;/span&gt; eps &lt;span style="color: blue;"&gt;on&lt;/span&gt; eps&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: magenta;"&gt;object_id&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; o&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: magenta;"&gt;object_id&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;cross&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: grey;"&gt;apply&lt;/span&gt; &lt;span style="color: green;"&gt;sys&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: green;"&gt;dm_exec_query_plan&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;eps&lt;span style="color: grey;"&gt;.&lt;/span&gt;plan_handle&lt;span style="color: grey;"&gt;)&lt;/span&gt; eqp &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;where&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; eqp&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: blue;"&gt;DBID&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; &lt;span style="color: magenta;"&gt;DB_ID&lt;/span&gt;&lt;span style="color: grey;"&gt;()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;order&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;by&lt;/span&gt; eps&lt;span style="color: grey;"&gt;.&lt;/span&gt;execution_count &lt;span style="color: blue;"&gt;desc&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2328222207349876984-6518071520887741870?l=www.sqltact.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/IFN1ijawoR2WSbpNNPuF7PyaP78/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IFN1ijawoR2WSbpNNPuF7PyaP78/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/IFN1ijawoR2WSbpNNPuF7PyaP78/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IFN1ijawoR2WSbpNNPuF7PyaP78/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=IQDayGgD5og:kmrpk55lHYk:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=IQDayGgD5og:kmrpk55lHYk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/SqlTact/~4/IQDayGgD5og" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqltact.com/feeds/6518071520887741870/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqltact.com/2011/12/view-execution-plan-for-sproc-in-wild.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/6518071520887741870?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/6518071520887741870?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SqlTact/~3/IQDayGgD5og/view-execution-plan-for-sproc-in-wild.html" title="View execution plan for a sproc in the wild" /><author><name>w</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.sqltact.com/2011/12/view-execution-plan-for-sproc-in-wild.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QCSXk9cCp7ImA9WhRUEUs.&quot;"><id>tag:blogger.com,1999:blog-2328222207349876984.post-9016083703868165301</id><published>2011-12-16T16:08:00.001-06:00</published><updated>2012-01-21T09:56:08.768-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-21T09:56:08.768-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql2012" /><category scheme="http://www.blogger.com/atom/ns#" term="dmv" /><title>Open_transaction_count in sys.dm_exec_sessions</title><content type="html">This news may be a few months old, but it is worth noting that there is now a column called open_transaction_count in the sys.dm_exec_sessions in SQL Server 2012.&lt;br /&gt;
&lt;br /&gt;
This should &lt;a href="http://sqlblog.com/blogs/kalen_delaney/archive/2008/06/29/why-i-still-need-sysprocesses.aspx"&gt;put away any need for you to use sys.sysprocesses&lt;/a&gt; for session information.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Beware, it can cause an ambiguity in existing queries, as this column already exists in sys.dm_exec_requests for the number of open transactions in a request. It is pretty handy to join these DMV's together on session_id.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a query I use regularly (a &lt;a href="http://www.sqltact.com/2011/10/using-sysdmexecrequests-to-find.html"&gt;shortened form of a previous post&lt;/a&gt;) which needed me to add the source alias for sys.dm_exec_sessions:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;select&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: teal;"&gt;&amp;nbsp; r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;session_id&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: grey; font-family: Consolas; font-size: 9.5pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: teal;"&gt;s&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: magenta;"&gt;host_name&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: grey; font-family: Consolas; font-size: 9.5pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: teal;"&gt;s&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: magenta;"&gt;program_name&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: grey; font-family: Consolas; font-size: 9.5pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: blue;"&gt;status&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; &lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;blocking_session_id&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; &lt;span style="color: teal;"&gt;DBName&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; &lt;span style="color: magenta;"&gt;db_name&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;database_id&lt;/span&gt;&lt;span style="color: grey;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; &lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;command&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; &lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;wait_type&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; &lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;wait_time&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; &lt;b&gt;&lt;span style="color: teal;"&gt;s&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;open_transaction_count&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: grey; font-family: Consolas; font-size: 9.5pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;cpu_time&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; &lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;total_elapsed_time&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; &lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;reads&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; &lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;writes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; &lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;logical_reads&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: grey; font-family: Consolas; font-size: 9.5pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&lt;span style="color: teal;"&gt;est&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;[text]&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: grey; font-family: Consolas; font-size: 9.5pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&lt;span style="color: teal;"&gt;offsettext&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: grey;"&gt;=&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: magenta;"&gt;SUBSTRING&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: teal;"&gt;est&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;[text]&lt;/span&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; &lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;statement_start_offset&lt;/span&gt;&lt;span style="color: grey;"&gt;/&lt;/span&gt;2 &lt;span style="color: grey;"&gt;+&lt;/span&gt; 1&lt;span style="color: grey;"&gt;,&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;CASE&lt;/span&gt; &lt;span style="color: blue;"&gt;WHEN&lt;/span&gt; &lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;statement_end_offset&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; &lt;span style="color: grey;"&gt;-&lt;/span&gt;1 &lt;span style="color: blue;"&gt;THEN&lt;/span&gt; &lt;span style="color: magenta;"&gt;LEN&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: magenta;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;nvarchar&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: magenta;"&gt;max&lt;/span&gt;&lt;span style="color: grey;"&gt;),&lt;/span&gt; &lt;span style="color: teal;"&gt;est&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;[text]&lt;/span&gt;&lt;span style="color: grey;"&gt;))&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;ELSE&lt;/span&gt; &lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;statement_end_offset&lt;/span&gt;&lt;span style="color: grey;"&gt;/&lt;/span&gt;2 &lt;span style="color: grey;"&gt;-&lt;/span&gt; &lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;statement_start_offset&lt;/span&gt;&lt;span style="color: grey;"&gt;/&lt;/span&gt;2 &lt;span style="color: grey;"&gt;+&lt;/span&gt; 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;span style="color: blue;"&gt;END&lt;/span&gt;&lt;span style="color: grey;"&gt;)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: grey; font-family: Consolas; font-size: 9.5pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;statement_start_offset&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: grey; font-family: Consolas; font-size: 9.5pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;statement_end_offset&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;from&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: green;"&gt;sys&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: green;"&gt;dm_exec_requests&lt;/span&gt; &lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: grey; font-family: Consolas; font-size: 9.5pt;"&gt;inner&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: grey;"&gt;join&lt;/span&gt; &lt;span style="color: green;"&gt;sys&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: green;"&gt;dm_exec_sessions&lt;/span&gt; &lt;span style="color: teal;"&gt;s&lt;/span&gt; &lt;span style="color: blue;"&gt;on&lt;/span&gt; &lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;session_id&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; &lt;span style="color: teal;"&gt;s&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;session_id&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: grey; font-family: Consolas; font-size: 9.5pt;"&gt;cross&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: grey;"&gt;apply&lt;/span&gt; &lt;span style="color: green;"&gt;sys&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: green;"&gt;dm_exec_sql_text&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: teal;"&gt;r&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: blue;"&gt;sql_handle&lt;/span&gt;&lt;span style="color: grey;"&gt;)&lt;/span&gt; &lt;span style="color: teal;"&gt;est&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;where&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: teal;"&gt;s&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;session_id&lt;/span&gt; &lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt; 5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: grey; font-family: Consolas; font-size: 9.5pt;"&gt;and&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: teal;"&gt;s&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: teal;"&gt;session_id&lt;/span&gt; &lt;span style="color: grey;"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span style="color: magenta;"&gt;@@SPID&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;o:p&gt;&lt;br /&gt;
&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2328222207349876984-9016083703868165301?l=www.sqltact.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zgL7v1G5WZOVIaNJSNifoI79BlE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zgL7v1G5WZOVIaNJSNifoI79BlE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zgL7v1G5WZOVIaNJSNifoI79BlE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zgL7v1G5WZOVIaNJSNifoI79BlE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=_Zydb7OmXDc:sTFX2QIlShw:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=_Zydb7OmXDc:sTFX2QIlShw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/SqlTact/~4/_Zydb7OmXDc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqltact.com/feeds/9016083703868165301/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqltact.com/2011/12/opentransactioncount-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/9016083703868165301?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/9016083703868165301?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SqlTact/~3/_Zydb7OmXDc/opentransactioncount-in.html" title="Open_transaction_count in sys.dm_exec_sessions" /><author><name>w</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.sqltact.com/2011/12/opentransactioncount-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIFSXw7eSp7ImA9WhdaEE8.&quot;"><id>tag:blogger.com,1999:blog-2328222207349876984.post-6088678966485770062</id><published>2011-10-19T05:00:00.002-05:00</published><updated>2011-10-19T07:48:38.201-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-19T07:48:38.201-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="dmv" /><title>Using sys.dm_exec_requests to find a blocking chain</title><content type="html">A query that calls&amp;nbsp;sys.dm_exec_requests and pulls the statement text out of the request is a handy script for any DBA's toolbox. &amp;nbsp;A simple version of the query performs a cross apply to&amp;nbsp;dm_exec_sql_text&amp;nbsp;and pulls out the request's TSQL statement-in-progress using the unicode character offsets.&lt;br /&gt;
&lt;br /&gt;
This is simple enough and does a good job as a queryable sp_who2 and DBCC INPUTBUFFER replacement to an extent.&lt;br /&gt;
&lt;br /&gt;
In an environment that suffers from frequent spells of query blocking, the ability to identify which query was leading the way becomes important in finding the query or queries to troubleshoot. &lt;br /&gt;
&lt;br /&gt;
Whether the end result of his query was a simple KILL command, and/or a walk down the hall to investigate the "business case" would be a&amp;nbsp;situational&amp;nbsp;decision.&lt;br /&gt;
&lt;br /&gt;
I wanted a blocking chain - a list of all other spids that a session was blocking.&lt;br /&gt;
&lt;br /&gt;
Here's a query that dumps the output of dm_exec_requests into a temporary table, then uses the XML PATH to conveniently transform the blocked_by list into a comma-delimited list in the row of the blocker. &amp;nbsp;The &amp;nbsp;sort order is the length of this comma-delimited list, putting the cause of a pileup right at the top.&lt;br /&gt;
&lt;br /&gt;
Doing this in a temp table was necessary because the blocking_session_id is a highly volatile column. &amp;nbsp;As a result, the output of this query is several ms behind "live". &amp;nbsp;After a few executions, the spid hanging out at the top is easy enough to spot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;create&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;table&lt;/span&gt; #ExecRequests&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;id &lt;span style="color: blue;"&gt;int&lt;/span&gt; &lt;span style="color: blue;"&gt;IDENTITY&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;1&lt;span style="color: grey;"&gt;,&lt;/span&gt;1&lt;span style="color: grey;"&gt;)&lt;/span&gt; &lt;span style="color: blue;"&gt;PRIMARY&lt;/span&gt; &lt;span style="color: blue;"&gt;KEY&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;session_id &lt;span style="color: blue;"&gt;smallint&lt;/span&gt; &lt;span style="color: grey;"&gt;not&lt;/span&gt; &lt;span style="color: grey;"&gt;null&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;request_id &lt;span style="color: blue;"&gt;int&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;start_time &lt;span style="color: blue;"&gt;datetime&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;status&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;nvarchar&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;60&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;command &lt;span style="color: blue;"&gt;nvarchar&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;32&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;sql_handle&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;varbinary&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;64&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;statement_start_offset &lt;span style="color: blue;"&gt;int&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;statement_end_offset &lt;span style="color: blue;"&gt;int&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;plan_handle &lt;span style="color: blue;"&gt;varbinary &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;64&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;database_id &lt;span style="color: blue;"&gt;smallint&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="color: magenta; font-family: 'Courier New'; font-size: 10pt;"&gt;user_id&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;int&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;blocking_session_id &lt;span style="color: blue;"&gt;smallint&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;wait_type &lt;span style="color: blue;"&gt;nvarchar &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;120&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;wait_time &lt;span style="color: blue;"&gt;int&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;cpu_time &lt;span style="color: blue;"&gt;int&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;tot_time &lt;span style="color: blue;"&gt;int&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;reads &lt;span style="color: blue;"&gt;bigint&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;writes &lt;span style="color: blue;"&gt;bigint&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;logical_reads &lt;span style="color: blue;"&gt;bigint&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;[host_name] &lt;span style="color: blue;"&gt;nvarchar&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;256&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;[program_name] &lt;span style="color: blue;"&gt;nvarchar&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;256&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;blocking_these &lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;1000&lt;span style="color: grey;"&gt;)&lt;/span&gt; &lt;span style="color: grey;"&gt;null&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;insert&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;into&lt;/span&gt; #ExecRequests&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;session_id&lt;span style="color: grey;"&gt;,&lt;/span&gt;request_id&lt;span style="color: grey;"&gt;,&lt;/span&gt; start_time&lt;span style="color: grey;"&gt;,&lt;/span&gt;&lt;span style="color: blue;"&gt;status&lt;/span&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt;command&lt;span style="color: grey;"&gt;,&lt;/span&gt;&lt;span style="color: blue;"&gt;sql_handle&lt;/span&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt;statement_start_offset&lt;span style="color: grey;"&gt;,&lt;/span&gt;statement_end_offset&lt;span style="color: grey;"&gt;,&lt;/span&gt;plan_handle&lt;span style="color: grey;"&gt;,&lt;/span&gt;database_id&lt;span style="color: grey;"&gt;,&lt;/span&gt;&lt;span style="color: magenta;"&gt;user_id&lt;/span&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt;blocking_session_id&lt;span style="color: grey;"&gt;,&lt;/span&gt;wait_type&lt;span style="color: grey;"&gt;,&lt;/span&gt;wait_time&lt;span style="color: grey;"&gt;,&lt;/span&gt;cpu_time&lt;span style="color: grey;"&gt;,&lt;/span&gt;tot_time&lt;span style="color: grey;"&gt;,&lt;/span&gt;reads&lt;span style="color: grey;"&gt;,&lt;/span&gt;writes&lt;span style="color: grey;"&gt;,&lt;/span&gt;logical_reads&lt;span style="color: grey;"&gt;,&lt;/span&gt;&lt;span style="color: magenta;"&gt;host_name&lt;/span&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; &lt;span style="color: magenta;"&gt;program_name&lt;/span&gt;&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;select&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;session_id&lt;span style="color: grey;"&gt;,&lt;/span&gt;request_id&lt;span style="color: grey;"&gt;,&lt;/span&gt; start_time&lt;span style="color: grey;"&gt;,&lt;/span&gt;r&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: blue;"&gt;status&lt;/span&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt;command&lt;span style="color: grey;"&gt;,&lt;/span&gt;&lt;span style="color: blue;"&gt;sql_handle&lt;/span&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt;statement_start_offset&lt;span style="color: grey;"&gt;,&lt;/span&gt;statement_end_offset&lt;span style="color: grey;"&gt;,&lt;/span&gt;plan_handle&lt;span style="color: grey;"&gt;,&lt;/span&gt;r&lt;span style="color: grey;"&gt;.&lt;/span&gt;database_id&lt;span style="color: grey;"&gt;,&lt;/span&gt;&lt;span style="color: magenta;"&gt;user_id&lt;/span&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt;blocking_session_id&lt;span style="color: grey;"&gt;,&lt;/span&gt;wait_type&lt;span style="color: grey;"&gt;,&lt;/span&gt;wait_time&lt;span style="color: grey;"&gt;,&lt;/span&gt;r&lt;span style="color: grey;"&gt;.&lt;/span&gt;cpu_time&lt;span style="color: grey;"&gt;,&lt;/span&gt;r&lt;span style="color: grey;"&gt;.&lt;/span&gt;total_elapsed_time&lt;span style="color: grey;"&gt;,&lt;/span&gt;r&lt;span style="color: grey;"&gt;.&lt;/span&gt;reads&lt;span style="color: grey;"&gt;,&lt;/span&gt;r&lt;span style="color: grey;"&gt;.&lt;/span&gt;writes&lt;span style="color: grey;"&gt;,&lt;/span&gt;r&lt;span style="color: grey;"&gt;.&lt;/span&gt;logical_reads&lt;span style="color: grey;"&gt;,&lt;/span&gt;s&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: magenta;"&gt;host_name&lt;/span&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; s&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: magenta;"&gt;program_name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;from&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: green;"&gt;sys&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: green;"&gt;dm_exec_requests&lt;/span&gt; r&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;left&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: grey;"&gt;outer&lt;/span&gt; &lt;span style="color: grey;"&gt;join&lt;/span&gt; &lt;span style="color: green;"&gt;sys&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: green;"&gt;dm_exec_sessions&lt;/span&gt; s &lt;span style="color: blue;"&gt;on&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;session_id &lt;span style="color: grey;"&gt;=&lt;/span&gt; s&lt;span style="color: grey;"&gt;.&lt;/span&gt;session_id&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;where&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; 1&lt;span style="color: grey;"&gt;=&lt;/span&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;and&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;session_id &lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt; 35 &lt;span style="color: green;"&gt;--retrieve only user spids&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;and&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;session_id &lt;span class="Apple-style-span" style="color: grey;"&gt;&amp;lt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: magenta;"&gt;@@SPID&lt;/span&gt; &lt;span style="color: green;"&gt;--ignore myself&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;update&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; #ExecRequests &lt;span style="color: blue;"&gt;set&lt;/span&gt; blocking_these &lt;span style="color: grey;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;select&lt;/span&gt; &lt;span style="color: magenta;"&gt;isnull&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: magenta;"&gt;convert&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;5&lt;span style="color: grey;"&gt;),&lt;/span&gt; er&lt;span style="color: grey;"&gt;.&lt;/span&gt;session_id&lt;span style="color: grey;"&gt;),&lt;/span&gt;&lt;span style="color: red;"&gt;''&lt;/span&gt;&lt;span style="color: grey;"&gt;)&lt;/span&gt; &lt;span style="color: grey;"&gt;+&lt;/span&gt; &lt;span style="color: red;"&gt;', '&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;from&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; #ExecRequests er&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;where&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; er&lt;span style="color: grey;"&gt;.&lt;/span&gt;blocking_session_id &lt;span style="color: grey;"&gt;=&lt;/span&gt; &lt;span style="color: magenta;"&gt;isnull&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;#ExecRequests&lt;span style="color: grey;"&gt;.&lt;/span&gt;session_id &lt;span style="color: grey;"&gt;,&lt;/span&gt;0&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;and&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; er&lt;span style="color: grey;"&gt;.&lt;/span&gt;blocking_session_id &lt;span style="color: grey;"&gt;&amp;lt;&amp;gt;&lt;/span&gt; 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;FOR&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;XML&lt;/span&gt; &lt;span style="color: blue;"&gt;PATH&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;''&lt;/span&gt;&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;select&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;r&lt;span style="color: grey;"&gt;.&lt;/span&gt;session_id&lt;span style="color: grey;"&gt;,&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: magenta;"&gt;host_name&lt;/span&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: magenta;"&gt;program_name&lt;/span&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: blue;"&gt;status&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;blocking_these&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: red;"&gt;'LEN(Blocking)'&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; &lt;span style="color: magenta;"&gt;LEN&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;r&lt;span style="color: grey;"&gt;.&lt;/span&gt;blocking_these&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; blocked_by &lt;span style="color: grey;"&gt;=&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;blocking_session_id&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;tot_time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; DBName &lt;span style="color: grey;"&gt;=&lt;/span&gt; &lt;span style="color: magenta;"&gt;db_name&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;r&lt;span style="color: grey;"&gt;.&lt;/span&gt;database_id&lt;span style="color: grey;"&gt;),&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;command&lt;span style="color: grey;"&gt;,&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;wait_type&lt;span style="color: grey;"&gt;,&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;tot_time&lt;span style="color: grey;"&gt;,&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;wait_time&lt;span style="color: grey;"&gt;,&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;cpu_time&lt;span style="color: grey;"&gt;,&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;reads&lt;span style="color: grey;"&gt;,&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;writes&lt;span style="color: grey;"&gt;,&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;logical_reads&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; [text] &lt;span style="color: grey;"&gt;=&lt;/span&gt; est&lt;span style="color: grey;"&gt;.&lt;/span&gt;[text]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; offsettext &lt;span style="color: grey;"&gt;=&lt;/span&gt; &lt;span style="color: blue;"&gt;CASE&lt;/span&gt; &lt;span style="color: blue;"&gt;WHEN&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;statement_start_offset &lt;span style="color: grey;"&gt;=&lt;/span&gt; 0 &lt;span style="color: grey;"&gt;and&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;statement_end_offset&lt;span style="color: grey;"&gt;=&lt;/span&gt; 0 &lt;span style="color: blue;"&gt;THEN&lt;/span&gt; &lt;span style="color: grey;"&gt;null&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;ELSE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: magenta; font-family: 'Courier New'; font-size: 10pt;"&gt;SUBSTRING&lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;(&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;est&lt;span style="color: grey;"&gt;.&lt;/span&gt;[text]&lt;span style="color: grey;"&gt;,&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;statement_start_offset&lt;span style="color: grey;"&gt;/&lt;/span&gt;2 &lt;span style="color: grey;"&gt;+&lt;/span&gt; 1&lt;span style="color: grey;"&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;CASE&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;WHEN&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;statement_end_offset &lt;span style="color: grey;"&gt;=&lt;/span&gt; &lt;span style="color: grey;"&gt;-&lt;/span&gt;1 &lt;span style="color: blue;"&gt;THEN&lt;/span&gt; &lt;span style="color: magenta;"&gt;LEN&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: magenta;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;nvarchar&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: magenta;"&gt;max&lt;/span&gt;&lt;span style="color: grey;"&gt;),&lt;/span&gt; est&lt;span style="color: grey;"&gt;.&lt;/span&gt;[text]&lt;span style="color: grey;"&gt;))&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;ELSE&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;statement_end_offset&lt;span style="color: grey;"&gt;/&lt;/span&gt;2 &lt;span style="color: grey;"&gt;-&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;statement_start_offset&lt;span style="color: grey;"&gt;/&lt;/span&gt;2 &lt;span style="color: grey;"&gt;+&lt;/span&gt; 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;END&lt;/span&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;END&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;statement_start_offset&lt;span style="color: grey;"&gt;,&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;statement_end_offset&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;from&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; #ExecRequests r&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: grey; font-family: 'Courier New'; font-size: 10pt;"&gt;outer&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: grey;"&gt;apply&lt;/span&gt; &lt;span style="color: green;"&gt;sys&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: green;"&gt;dm_exec_sql_text&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;r&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: blue;"&gt;sql_handle&lt;/span&gt;&lt;span style="color: grey;"&gt;)&lt;/span&gt; est&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;order&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;by&lt;/span&gt; &lt;span style="color: magenta;"&gt;LEN&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;r&lt;span style="color: grey;"&gt;.&lt;/span&gt;blocking_these&lt;span style="color: grey;"&gt;)&lt;/span&gt; &lt;span style="color: blue;"&gt;desc&lt;/span&gt;&lt;span style="color: grey;"&gt;,&lt;/span&gt; r&lt;span style="color: grey;"&gt;.&lt;/span&gt;session_id &lt;span style="color: blue;"&gt;asc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;go&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;drop&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;table&lt;/span&gt; #ExecRequests&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2328222207349876984-6088678966485770062?l=www.sqltact.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MtCNidrh3MaWK2jK7wbVnzmFOd4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MtCNidrh3MaWK2jK7wbVnzmFOd4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/MtCNidrh3MaWK2jK7wbVnzmFOd4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MtCNidrh3MaWK2jK7wbVnzmFOd4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=rrzfrOLWFRg:UON1LaY8zCU:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=rrzfrOLWFRg:UON1LaY8zCU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/SqlTact/~4/rrzfrOLWFRg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqltact.com/feeds/6088678966485770062/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqltact.com/2011/10/using-sysdmexecrequests-to-find.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/6088678966485770062?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/6088678966485770062?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SqlTact/~3/rrzfrOLWFRg/using-sysdmexecrequests-to-find.html" title="Using sys.dm_exec_requests to find a blocking chain" /><author><name>w</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://www.sqltact.com/2011/10/using-sysdmexecrequests-to-find.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkADSHw7fyp7ImA9WhdbF08.&quot;"><id>tag:blogger.com,1999:blog-2328222207349876984.post-1370859297221890502</id><published>2011-10-15T18:19:00.000-05:00</published><updated>2011-10-15T18:19:39.207-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-15T18:19:39.207-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="houstontechfest" /><category scheme="http://www.blogger.com/atom/ns#" term="dmv" /><title>Slides and Sample code: SQL Server Admin Best Practices with DMV's from the Houston TechFest 2011</title><content type="html">Here's my official blog page for my presentation on &lt;a href="http://www.houstontechfest.com/dotnetnuke/HoustonTechFest/Sessions/tabid/56/CodecampId/3/SessionId/317/Default.aspx"&gt;SQL Server Admin Best Practices with DMV's&lt;/a&gt; from the Houston TechFest 2011 on October 15. &amp;nbsp;Thanks for attending my session in the of a great event put on by Michael and the entire Houston TechFest team. &amp;nbsp;The University of Houston was a great host for the event!&lt;br /&gt;
&lt;br /&gt;
Thanks also to all the sponsors who attendees. &amp;nbsp;In the speaker room I heard some discussion of HTF's decision to have back-to-back Keynotes in the morning, not starting the actual sessions until 11AM and then breaking for lunch at noon. &amp;nbsp;I have to agree with what I heard - the vendors paid the money to put this free event on, why not give them the freshest audience? &amp;nbsp;As a veteran of three SQL Saturdays in Baton Rouge, I have to admit it was an uncommon but inventive scheduling decision. &amp;nbsp;If it increases vendor satisfaction and retention for next year's event, nobody should mind, especially the attendees.&lt;br /&gt;
&lt;br /&gt;
Download &lt;a href="https://docs.google.com/viewer?a=v&amp;amp;pid=explorer&amp;amp;chrome=true&amp;amp;srcid=0B34dqsXqkyf1MzBhMTJhOTMtYzUzYS00NzE1LWI1NDktY2JiMzY1YzE5ZjIz&amp;amp;hl=en"&gt;slides and sample code here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
You can give me a &lt;a href="http://speakerrate.com/talks/8726-sql-admin-best-practices-with-dmv%E2%80%99s"&gt;rating on SpeakerRate here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2328222207349876984-1370859297221890502?l=www.sqltact.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/nnO7c32jhLAgx-3FuGUZpZXwfqU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nnO7c32jhLAgx-3FuGUZpZXwfqU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/nnO7c32jhLAgx-3FuGUZpZXwfqU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nnO7c32jhLAgx-3FuGUZpZXwfqU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=ttUuMNTIUIo:XAzaloKAfJI:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=ttUuMNTIUIo:XAzaloKAfJI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/SqlTact/~4/ttUuMNTIUIo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqltact.com/feeds/1370859297221890502/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqltact.com/2011/10/slides-and-sample-code-sql-server-admin.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/1370859297221890502?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/1370859297221890502?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SqlTact/~3/ttUuMNTIUIo/slides-and-sample-code-sql-server-admin.html" title="Slides and Sample code: SQL Server Admin Best Practices with DMV's from the Houston TechFest 2011" /><author><name>w</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.sqltact.com/2011/10/slides-and-sample-code-sql-server-admin.html</feedburner:origLink></entry></feed>

