<?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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CEECQH4ycSp7ImA9WxNWF0s.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437</id><updated>2009-10-17T03:57:41.099-03:00</updated><title>Wandenkolk &amp; SQL Server</title><subtitle type="html">This a space to learn something new about SQL Server and related technologies. 
Feel like you´re in your own house, but don´t touch my beer! ;)</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://sqlwanden.blogspot.com/" /><link rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>69</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/sqlwanden" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry gd:etag="W/&quot;D0ENQn0-cSp7ImA9WxVQGEk.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-5416181407582120228</id><published>2009-02-05T11:54:00.001-03:00</published><updated>2009-02-05T11:54:53.359-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-05T11:54:53.359-03:00</app:edited><title>New Address</title><content type="html">&lt;p&gt;Hi Fellows&lt;/p&gt;  &lt;p&gt;I´m transfering my blog activities to the live space… it´s better to embed photos documents, etc… besides i got a plenty of space on SKy Drive, which is very cool. And i could stay in touch with my fellows around the globe. I hope you enjoy the new experience… &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://wandenkolk.spaces.live.com/blog/"&gt;http://wandenkolk.spaces.live.com/blog/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Kind regards.&lt;/p&gt;  &lt;p&gt;Wanden&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-5416181407582120228?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/5416181407582120228/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=5416181407582120228" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/5416181407582120228?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/5416181407582120228?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/CKG8g_Vk_B0/new-address.html" title="New Address" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2009/02/new-address.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMMR346cCp7ImA9WxVQGEk.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-6380850179076246671</id><published>2009-02-05T11:34:00.001-03:00</published><updated>2009-02-05T11:34:46.018-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-05T11:34:46.018-03:00</app:edited><title>it Worth a Click</title><content type="html">&lt;p&gt;&lt;a title="http://www.microsoft.com/azure/sql.mspx" href="http://www.microsoft.com/azure/sql.mspx"&gt;http://www.microsoft.com/azure/sql.mspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Imagine do not have to have a database.. you only consume database services from a cloud of servers somewhere…&lt;/p&gt;  &lt;p&gt;:)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-6380850179076246671?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/6380850179076246671/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=6380850179076246671" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/6380850179076246671?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/6380850179076246671?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/GseBWpeLvtw/it-worth-click.html" title="it Worth a Click" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2009/02/it-worth-click.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIFRHo4cSp7ImA9WxVRFEU.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-2682061051652634011</id><published>2009-01-20T16:41:00.001-03:00</published><updated>2009-01-20T16:41:55.439-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-20T16:41:55.439-03:00</app:edited><title>Obtaining stored execution plans from the Procedure Cache</title><content type="html">&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The question is, can we spy on procedure cache to see all the plans stored in there?&lt;/p&gt;  &lt;p&gt;Yes we can! (by the way, congrats to the new president)&lt;/p&gt;  &lt;p&gt;Select e.cacheobjtype, q.query_plan , DB_NAME(q.dbid) as database_name,&amp;#160; e.refcounts, e.usecounts , (e.size_in_bytes / 1024 ) as size_in_kb&amp;#160; from sys.dm_Exec_cached_plans as e Cross Apply sys.dm_exec_query_plan(e.plan_handle) as q&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The query returns the following result:`(i know is a bit messy, but who cares?)&lt;/p&gt;  &lt;p&gt;cacheobjtype&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; query_plan&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; database_name&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; refcounts&amp;#160;&amp;#160; usecounts&amp;#160;&amp;#160; size_in_kb   &lt;br /&gt;-------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- ----------- ----------- -----------    &lt;br /&gt;Compiled Plan&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ShowPlanXML xmlns=&amp;quot;&lt;a href="http://schemas.microsoft.com/sqlserver/2004/07/showplan""&gt;http://schemas.microsoft.com/sqlserver/2004/07/showplan&amp;quot;&lt;/a&gt; Version=&amp;quot;1.1&amp;quot; Build=&amp;quot;10.0.1600.22&amp;quot;&amp;gt;&amp;lt;BatchSequence&amp;gt;&amp;lt;Batch&amp;gt;&amp;lt;Statements&amp;gt;&amp;lt;StmtSimple StatementText=&amp;quot;&amp;amp;#xD;&amp;amp;#xA;CREATE PROCEDURE [dbo].[CleanExpiredJobs]&amp;amp;#xD;&amp;amp;#xA;AS&amp;amp;#xD;&amp;amp;#xA;SET NOCOUN ReportServer&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 48    &lt;br /&gt;Compiled Plan&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ShowPlanXML xmlns=&amp;quot;&lt;a href="http://schemas.microsoft.com/sqlserver/2004/07/showplan""&gt;http://schemas.microsoft.com/sqlserver/2004/07/showplan&amp;quot;&lt;/a&gt; Version=&amp;quot;1.1&amp;quot; Build=&amp;quot;10.0.1600.22&amp;quot;&amp;gt;&amp;lt;BatchSequence&amp;gt;&amp;lt;Batch&amp;gt;&amp;lt;Statements&amp;gt;&amp;lt;StmtSimple StatementText=&amp;quot;&amp;amp;#xD;&amp;amp;#xA;CREATE PROCEDURE [dbo].[CleanOrphanedSnapshots]&amp;amp;#xD;&amp;amp;#xA;@Machine nvarcha ReportServer&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 1096    &lt;br /&gt;Compiled Plan&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ShowPlanXML xmlns=&amp;quot;&lt;a href="http://schemas.microsoft.com/sqlserver/2004/07/showplan""&gt;http://schemas.microsoft.com/sqlserver/2004/07/showplan&amp;quot;&lt;/a&gt; Version=&amp;quot;1.1&amp;quot; Build=&amp;quot;10.0.1600.22&amp;quot;&amp;gt;&amp;lt;BatchSequence&amp;gt;&amp;lt;Batch&amp;gt;&amp;lt;Statements&amp;gt;&amp;lt;StmtSimple StatementText=&amp;quot;&amp;amp;#xD;&amp;amp;#xA;CREATE PROCEDURE [dbo].[CleanExpiredCache]&amp;amp;#xD;&amp;amp;#xA;AS&amp;amp;#xD;&amp;amp;#xA;SET NOCOU ReportServer&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 96    &lt;br /&gt;Compiled Plan&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ShowPlanXML xmlns=&amp;quot;&lt;a href="http://schemas.microsoft.com/sqlserver/2004/07/showplan""&gt;http://schemas.microsoft.com/sqlserver/2004/07/showplan&amp;quot;&lt;/a&gt; Version=&amp;quot;1.1&amp;quot; Build=&amp;quot;10.0.1600.22&amp;quot;&amp;gt;&amp;lt;BatchSequence&amp;gt;&amp;lt;Batch&amp;gt;&amp;lt;Statements&amp;gt;&amp;lt;StmtSimple StatementText=&amp;quot;&amp;amp;#xD;&amp;amp;#xA;CREATE PROCEDURE [dbo].[DeleteExpiredPersistedStreams]&amp;amp;#xD;&amp;amp;#xA;AS&amp;amp;#xD;&amp;amp;# ReportServer&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 56&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-2682061051652634011?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/2682061051652634011/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=2682061051652634011" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/2682061051652634011?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/2682061051652634011?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/K0KuDaZx1Lo/obtaining-stored-execution-plans-from.html" title="Obtaining stored execution plans from the Procedure Cache" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2009/01/obtaining-stored-execution-plans-from.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A08ASXYyfip7ImA9WxVREE8.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-9113420994871028530</id><published>2009-01-15T11:30:00.001-03:00</published><updated>2009-01-15T11:30:48.896-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-15T11:30:48.896-03:00</app:edited><title>sys.dm_os_wait_stats</title><content type="html">&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Regarding waiting for resources on sql server, one of the most valuable resources is the DMV above mentioned. But the point is, what on earth means the wait type. Follows an excerpt from SQL Server Books Online which explains the meaning of each one wait types.. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Select * from sys.dm_os_wait_stats Order by Wait_time_ms DESC --&amp;#160; for example&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;wait_type&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; waiting_tasks_count&amp;#160; wait_time_ms&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; max_wait_time_ms&amp;#160;&amp;#160;&amp;#160;&amp;#160; signal_wait_time_ms   &lt;br /&gt;------------------------------------------------------------ -------------------- -------------------- -------------------- --------------------    &lt;br /&gt;LAZYWRITER_SLEEP&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 77093&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 77124252&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 1218&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 7602    &lt;br /&gt;REQUEST_FOR_DEADLOCK_SEARCH&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 15425&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 77123140&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 5094&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 77123140    &lt;br /&gt;...&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The following table lists the wait types encountered by tasks.&lt;/p&gt;  &lt;h5&gt;&lt;/h5&gt;  &lt;p&gt;Wait type    &lt;br /&gt;Description &lt;/p&gt;  &lt;p&gt;ASYNC_DISKPOOL_LOCK&lt;/p&gt;  &lt;p&gt;Occurs when there is an attempt to synchronize parallel threads that are performing tasks such as creating or initializing a file.&lt;/p&gt;  &lt;p&gt;ASYNC_IO_COMPLETION&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting for I/Os to finish.&lt;/p&gt;  &lt;p&gt;ASYNC_NETWORK_IO&lt;/p&gt;  &lt;p&gt;Occurs on network writes when the task is blocked behind the network. Verify that the client is processing data from the server.&lt;/p&gt;  &lt;p&gt;BACKUP&lt;/p&gt;  &lt;p&gt;Occurs when a task is blocked as part of backup processing.&lt;/p&gt;  &lt;p&gt;BACKUP_CLIENTLOCK&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;BACKUP_OPERATOR&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting for a tape mount. To view the tape status, query sys.dm_io_backup_tapes. If a mount operation is not pending, this wait type may indicate a hardware problem with the tape drive.&lt;/p&gt;  &lt;p&gt;BACKUPBUFFER&lt;/p&gt;  &lt;p&gt;Occurs when a backup task is waiting for data, or is waiting for a buffer in which to store data. This type is not typical, except when a task is waiting for a tape mount.&lt;/p&gt;  &lt;p&gt;BACKUPIO&lt;/p&gt;  &lt;p&gt;Occurs when a backup task is waiting for data, or is waiting for a buffer in which to store data. This type is not typical, except when a task is waiting for a tape mount.&lt;/p&gt;  &lt;p&gt;BACKUPTHREAD&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting for a backup task to finish. Wait times may be long, from several minutes to several hours. If the task that is being waited on is in an I/O process, this type does not indicate a problem.&lt;/p&gt;  &lt;p&gt;BAD_PAGE_PROCESS&lt;/p&gt;  &lt;p&gt;Occurs when the background suspect page logger is trying to avoid running more than every five seconds. Excessive suspect pages cause the logger to run frequently.&lt;/p&gt;  &lt;p&gt;BROKER_CONNECTION_RECEIVE_TASK&lt;/p&gt;  &lt;p&gt;Occurs when waiting for access to receive a message on a connection endpoint. Receive access to the endpoint is serialized.&lt;/p&gt;  &lt;p&gt;BROKER_ENDPOINT_STATE_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs when there is contention to access the state of a Service Broker connection endpoint. Access to the state for changes is serialized.&lt;/p&gt;  &lt;p&gt;BROKER_EVENTHANDLER&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting in the primary event handler of the Service Broker. This should occur very briefly.&lt;/p&gt;  &lt;p&gt;BROKER_INIT&lt;/p&gt;  &lt;p&gt;Occurs when initializing Service Broker in each active database. This should occur infrequently.&lt;/p&gt;  &lt;p&gt;BROKER_MASTERSTART&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting for the primary event handler of the Service Broker to start. This should occur very briefly.&lt;/p&gt;  &lt;p&gt;BROKER_RECEIVE_WAITFOR&lt;/p&gt;  &lt;p&gt;Occurs when the RECEIVE WAITFOR is waiting. This is typical if no messages are ready to be received.&lt;/p&gt;  &lt;p&gt;BROKER_REGISTERALLENDPOINTS&lt;/p&gt;  &lt;p&gt;Occurs during the initialization of a Service Broker connection endpoint. This should occur very briefly.&lt;/p&gt;  &lt;p&gt;BROKER_SHUTDOWN&lt;/p&gt;  &lt;p&gt;Occurs when there is a planned shutdown of Service Broker. This should occur very briefly, if at all.&lt;/p&gt;  &lt;p&gt;BROKER_TRANSMITTER&lt;/p&gt;  &lt;p&gt;Occurs when the Service Broker transmitter is waiting for work.&lt;/p&gt;  &lt;p&gt;BUILTIN_HASHKEY_MUTEX&lt;/p&gt;  &lt;p&gt;May occur after startup of instance, while internal data structures are initializing. Will not recur once data structures have initialized.&lt;/p&gt;  &lt;p&gt;CHECKPOINT_QUEUE&lt;/p&gt;  &lt;p&gt;Occurs while the checkpoint task is waiting for the next checkpoint request.&lt;/p&gt;  &lt;p&gt;CHKPT&lt;/p&gt;  &lt;p&gt;Occurs at server startup to tell the checkpoint thread that it can start.&lt;/p&gt;  &lt;p&gt;CLR_AUTO_EVENT&lt;/p&gt;  &lt;p&gt;Occurs when a task is currently performing common language runtime (CLR) execution and is waiting for a particular autoevent to be initiated. Long waits are typical, and do not indicate a problem.&lt;/p&gt;  &lt;p&gt;CLR_CRST&lt;/p&gt;  &lt;p&gt;Occurs when a task is currently performing CLR execution and is waiting to enter a critical section of the task that is currently being used by another task.&lt;/p&gt;  &lt;p&gt;CLR_JOIN&lt;/p&gt;  &lt;p&gt;Occurs when a task is currently performing CLR execution and waiting for another task to end. This wait state occurs when there is a join between tasks.&lt;/p&gt;  &lt;p&gt;CLR_MANUAL_EVENT&lt;/p&gt;  &lt;p&gt;Occurs when a task is currently performing CLR execution and is waiting for a specific manual event to be initiated.&lt;/p&gt;  &lt;p&gt;CLR_MONITOR&lt;/p&gt;  &lt;p&gt;Occurs when a task is currently performing CLR execution and is waiting to obtain a lock on the monitor.&lt;/p&gt;  &lt;p&gt;CLR_RWLOCK_READER&lt;/p&gt;  &lt;p&gt;Occurs when a task is currently performing CLR execution and is waiting for a reader lock.&lt;/p&gt;  &lt;p&gt;CLR_RWLOCK_WRITER&lt;/p&gt;  &lt;p&gt;Occurs when a task is currently performing CLR execution and is waiting for a writer lock.&lt;/p&gt;  &lt;p&gt;CLR_SEMAPHORE&lt;/p&gt;  &lt;p&gt;Occurs when a task is currently performing CLR execution and is waiting for a semaphore.&lt;/p&gt;  &lt;p&gt;CLR_TASK_START&lt;/p&gt;  &lt;p&gt;Occurs while waiting for a CLR task to complete startup.&lt;/p&gt;  &lt;p&gt;CMEMTHREAD&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting on a thread-safe memory object. The wait time might increase when there is contention caused by multiple tasks trying to allocate memory from the same memory object.&lt;/p&gt;  &lt;p&gt;CURSOR&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;CURSOR_ASYNC&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;CXPACKET&lt;/p&gt;  &lt;p&gt;Occurs when trying to synchronize the query processor exchange iterator. You may consider lowering the degree of parallelism if contention on this wait type becomes a problem.&lt;/p&gt;  &lt;p&gt;DBMIRROR_DBM_EVENT&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;DBMIRROR_DBM_MUTEX&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;DBMIRROR_EVENTS_QUEUE&lt;/p&gt;  &lt;p&gt;Occurs when database mirroring waits for events to process.&lt;/p&gt;  &lt;p&gt;DBMIRROR_SEND&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting for a communications backlog at the network layer to clear to be able to send messages. Indicates that the communications layer is starting to become overloaded and affect the database mirroring data throughput.&lt;/p&gt;  &lt;p&gt;DBMIRROR_WORKER_QUEUE&lt;/p&gt;  &lt;p&gt;Indicates that the database mirroring worker task is waiting for more work.&lt;/p&gt;  &lt;p&gt;DBMIRRORING_CMD&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting for log records to be flushed to disk. This wait state is expected to be held for long periods of time.&lt;/p&gt;  &lt;p&gt;DBTABLE&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;DEADLOCK_ENUM_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs when the deadlock monitor and &lt;b&gt;sys.dm_os_waiting_tasks&lt;/b&gt; try to make sure that SQL Server is not running multiple deadlock searches at the same time.&lt;/p&gt;  &lt;p&gt;DEADLOCK_TASK_SEARCH&lt;/p&gt;  &lt;p&gt;Large waiting time on this resource indicates that the server is executing queries on top of &lt;b&gt;sys.dm_os_waiting_tasks&lt;/b&gt;, and these queries are blocking deadlock monitor from running deadlock search. This wait type is used by deadlock monitor only. Queries on top of &lt;b&gt;sys.dm_os_waiting_tasks&lt;/b&gt; use DEADLOCK_ENUM_MUTEX.&lt;/p&gt;  &lt;p&gt;DEBUG&lt;/p&gt;  &lt;p&gt;Occurs during Transact-SQL and CLR debugging for internal synchronization.&lt;/p&gt;  &lt;p&gt;DISABLE_VERSIONING&lt;/p&gt;  &lt;p&gt;Occurs when SQL Server polls the version transaction manager to see whether the timestamp of the earliest active transaction is later than the timestamp of when the state started changing. If this is this case, all the snapshot transactions that were started before the ALTER DATABASE statement was run have finished. This wait state is used when SQL Server disables versioning by using the ALTER DATABASE statement.&lt;/p&gt;  &lt;p&gt;DISKIO_SUSPEND&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to access a file when an external backup is active. This is reported for each waiting user process. A count larger than five per user process may indicate that the external backup is taking too much time to finish.&lt;/p&gt;  &lt;p&gt;DLL_LOADING_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs once while waiting for the XML parser DLL to load.&lt;/p&gt;  &lt;p&gt;DROPTEMP&lt;/p&gt;  &lt;p&gt;Occurs between attempts to drop a temporary object if the previous attempt failed. The wait duration grows exponentially with each failed drop attempt.&lt;/p&gt;  &lt;p&gt;DTC&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting on an event that is used to manage state transition. This state controls when the recovery of Microsoft Distributed Transaction Coordinator (MS DTC) transactions occurs after SQL Server receives notification that the MS DTC service has become unavailable.&lt;/p&gt;  &lt;p&gt;This state also describes a task that is waiting when a commit of a MS DTC transaction is initiated by SQL Server and SQL Server is waiting for the MS DTC commit to finish.&lt;/p&gt;  &lt;p&gt;DTC_ABORT_REQUEST&lt;/p&gt;  &lt;p&gt;Occurs in a MS DTC worker session when the session is waiting to take ownership of a MS DTC transaction. After MS DTC owns the transaction, the session can roll back the transaction. Generally, the session will wait for another session that is using the transaction.&lt;/p&gt;  &lt;p&gt;DTC_RESOLVE&lt;/p&gt;  &lt;p&gt;Occurs when a recovery task is waiting for the &lt;b&gt;master&lt;/b&gt; database in a cross-database transaction so that the task can query the outcome of the transaction.&lt;/p&gt;  &lt;p&gt;DTC_STATE&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting on an event that protects changes to the internal MS DTC global state object. This state should be held for very short periods of time.&lt;/p&gt;  &lt;p&gt;DTC_TMDOWN_REQUEST&lt;/p&gt;  &lt;p&gt;Occurs in a MS DTC worker session when SQL Server receives notification that the MS DTC service is not available. First, the worker will wait for the MS DTC recovery process to start. Then, the worker waits to obtain the outcome of the distributed transaction that the worker is working on. This may continue until the connection with the MS DTC service has been reestablished.&lt;/p&gt;  &lt;p&gt;DTC_WAITFOR_OUTCOME&lt;/p&gt;  &lt;p&gt;Occurs when recovery tasks wait for MS DTC to become active to enable the resolution of prepared transactions.&lt;/p&gt;  &lt;p&gt;DUMP_LOG_COORDINATOR&lt;/p&gt;  &lt;p&gt;Occurs when a main task is waiting for a subtask to generate data. Ordinarily, this state does not occur. A long wait indicates an unexpected blockage. The subtask should be investigated.&lt;/p&gt;  &lt;p&gt;EC&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;EE_PMOLOCK&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of certain types of memory allocations during statement execution.&lt;/p&gt;  &lt;p&gt;EE_SPECPROC_MAP_INIT&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of internal procedure hash table creation. This wait can only occur during the initial accessing of the hash table after the SQL Server instance starts.&lt;/p&gt;  &lt;p&gt;ENABLE_VERSIONING&lt;/p&gt;  &lt;p&gt;Occurs when SQL Server waits for all update transactions in this database to finish before declaring the database ready to transition to snapshot isolation allowed state. This state is used when SQL Server enables snapshot isolation by using the ALTER DATABASE statement.&lt;/p&gt;  &lt;p&gt;ERROR_REPORTING_MANAGER&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of multiple concurrent error log initializations.&lt;/p&gt;  &lt;p&gt;EXCHANGE&lt;/p&gt;  &lt;p&gt;Occurs during synchronization in the query processor exchange iterator during parallel queries.&lt;/p&gt;  &lt;p&gt;EXECSYNC&lt;/p&gt;  &lt;p&gt;Occurs during parallel queries while synchronizing in query processor in areas not related to the exchange iterator. Examples of such areas are bitmaps, large binary objects (LOBs), and the spool iterator. LOBs may frequently use this wait state.&lt;/p&gt;  &lt;p&gt;FAILPOINT&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;FCB_REPLICA_READ&lt;/p&gt;  &lt;p&gt;Occurs when the reads of a snapshot (or a temporary snapshot created by DBCC) sparse file are synchronized.&lt;/p&gt;  &lt;p&gt;FCB_REPLICA_WRITE&lt;/p&gt;  &lt;p&gt;Occurs when the pushing or pulling of a page to a snapshot (or a temporary snapshot created by DBCC) sparse file is synchronized.&lt;/p&gt;  &lt;p&gt;FT_RESTART_CRAWL&lt;/p&gt;  &lt;p&gt;Occurs when a full-text crawl needs to restart from a last known good point to recover from a transient failure. The wait lets the worker tasks currently working on that population to complete or exit the current step.&lt;/p&gt;  &lt;p&gt;FT_RESUME_CRAWL&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;FULLTEXT GATHERER&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of full-text operations.&lt;/p&gt;  &lt;p&gt;HTTP_ENDPOINT_COLLCREATE&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;HTTP_ENUMERATION&lt;/p&gt;  &lt;p&gt;Occurs at startup to enumerate the HTTP endpoints to start HTTP.&lt;/p&gt;  &lt;p&gt;HTTP_START&lt;/p&gt;  &lt;p&gt;Occurs when a connection is waiting for HTTP to complete initialization.&lt;/p&gt;  &lt;p&gt;IMP_IMPORT_MUTEX&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;IMPPROV_IOWAIT&lt;/p&gt;  &lt;p&gt;Occurs when SQL Server waits for a bulkload I/O to finish.&lt;/p&gt;  &lt;p&gt;INDEX_USAGE_STATS_MUTEX&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;IO_AUDIT_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of trace event buffers.&lt;/p&gt;  &lt;p&gt;IO_COMPLETION&lt;/p&gt;  &lt;p&gt;Occurs while waiting for I/O operations to complete. This wait type generally represents non-data page I/Os. Data page I/O completion waits appear as PAGEIOLATCH_* waits.&lt;/p&gt;  &lt;p&gt;KSOURCE_WAKEUP&lt;/p&gt;  &lt;p&gt;Used by the service control task while waiting for requests from the Service Control Manager. Long waits are expected and do not indicate a problem.&lt;/p&gt;  &lt;p&gt;KTM_ENLISTMENT&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;KTM_RECOVERY_MANAGER&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;KTM_RECOVERY_RESOLUTION&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;LATCH_DT&lt;/p&gt;  &lt;p&gt;Occurs when waiting for a DT (destroy) latch. This does not include buffer latches or transaction mark latches. A listing of LATCH_* waits is available in &lt;b&gt;sys.dm_os_latch_stats&lt;/b&gt;. Note that &lt;b&gt;sys.dm_os_latch_stats&lt;/b&gt; groups LATCH_NL, LATCH_SH, LATCH_UP, LATCH_EX, and LATCH_DT waits together.&lt;/p&gt;  &lt;p&gt;LATCH_EX&lt;/p&gt;  &lt;p&gt;Occurs when waiting for an EX (exclusive) latch. This does not include buffer latches or transaction mark latches. A listing of LATCH_* waits is available in &lt;b&gt;sys.dm_os_latch_stats&lt;/b&gt;. Note that &lt;b&gt;sys.dm_os_latch_stats&lt;/b&gt; groups LATCH_NL, LATCH_SH, LATCH_UP, LATCH_EX, and LATCH_DT waits together.&lt;/p&gt;  &lt;p&gt;LATCH_KP&lt;/p&gt;  &lt;p&gt;Occurs when waiting for a KP (keep) latch. This does not include buffer latches or transaction mark latches. A listing of LATCH_* waits is available in &lt;b&gt;sys.dm_os_latch_stats&lt;/b&gt;. Note that &lt;b&gt;sys.dm_os_latch_stats&lt;/b&gt; groups LATCH_NL, LATCH_SH, LATCH_UP, LATCH_EX, and LATCH_DT waits together.&lt;/p&gt;  &lt;p&gt;LATCH_NL&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;LATCH_SH&lt;/p&gt;  &lt;p&gt;Occurs when waiting for an SH (share) latch. This does not include buffer latches or transaction mark latches. A listing of LATCH_* waits is available in &lt;b&gt;sys.dm_os_latch_stats&lt;/b&gt;. Note that &lt;b&gt;sys.dm_os_latch_stats&lt;/b&gt; groups LATCH_NL, LATCH_SH, LATCH_UP, LATCH_EX, and LATCH_DT waits together.&lt;/p&gt;  &lt;p&gt;LATCH_UP&lt;/p&gt;  &lt;p&gt;Occurs when waiting for an UP (update) latch. This does not include buffer latches or transaction mark latches. A listing of LATCH_* waits is available in &lt;b&gt;sys.dm_os_latch_stats&lt;/b&gt;. Note that &lt;b&gt;sys.dm_os_latch_stats&lt;/b&gt; groups LATCH_NL, LATCH_SH, LATCH_UP, LATCH_EX, and LATCH_DT waits together.&lt;/p&gt;  &lt;p&gt;LAZYWRITER_SLEEP&lt;/p&gt;  &lt;p&gt;Occurs when lazywriter tasks are suspended. This is a measure of the time spent by background tasks that are waiting. Do not consider this state when you are looking for user stalls.&lt;/p&gt;  &lt;p&gt;LCK_M_BU&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire a Bulk Update (BU) lock. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL).&lt;/p&gt;  &lt;p&gt;LCK_M_IS&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire an Intent Shared (IS) lock. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL).&lt;/p&gt;  &lt;p&gt;LCK_M_IU&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire an Intent Update (IU) lock. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL).&lt;/p&gt;  &lt;p&gt;LCK_M_IX&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire an Intent Exclusive (IX) lock. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL).&lt;/p&gt;  &lt;p&gt;LCK_M_RIn_NL&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire a NULL lock on the current key value, and an Insert Range lock between the current and previous key. A NULL lock on the key is an instant release lock. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL).&lt;/p&gt;  &lt;p&gt;LCK_M_RIn_S&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire a shared lock on the current key value, and an Insert Range lock between the current and previous key. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL).&lt;/p&gt;  &lt;p&gt;LCK_M_RIn_U&lt;/p&gt;  &lt;p&gt;Task is waiting to acquire an Update lock on the current key value, and an Insert Range lock between the current and previous key. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL). &lt;/p&gt;  &lt;p&gt;LCK_M_RIn_X&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire an Exclusive lock on the current key value, and an Insert Range lock between the current and previous key. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL). &lt;/p&gt;  &lt;p&gt;LCK_M_RS_S&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire a Shared lock on the current key value, and a Shared Range lock between the current and previous key. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL). &lt;/p&gt;  &lt;p&gt;LCK_M_RS_U&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire an Update lock on the current key value, and an Update Range lock between the current and previous key. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL). &lt;/p&gt;  &lt;p&gt;LCK_M_RX_S&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire a Shared lock on the current key value, and an Exclusive Range lock between the current and previous key. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL). &lt;/p&gt;  &lt;p&gt;LCK_M_RX_U&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire an Update lock on the current key value, and an Exclusive range lock between the current and previous key. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL). &lt;/p&gt;  &lt;p&gt;LCK_M_RX_X&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire an Exclusive lock on the current key value, and an Exclusive Range lock between the current and previous key. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL). &lt;/p&gt;  &lt;p&gt;LCK_M_S&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire a Shared lock. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL). &lt;/p&gt;  &lt;p&gt;LCK_M_SCH_M&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire a Schema Modify lock. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL). &lt;/p&gt;  &lt;p&gt;LCK_M_SCH_S&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire a Schema Share lock. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL). &lt;/p&gt;  &lt;p&gt;LCK_M_SIU&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire a Shared With Intent Update lock. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL). &lt;/p&gt;  &lt;p&gt;LCK_M_SIX&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire a Shared With Intent Exclusive lock. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL). &lt;/p&gt;  &lt;p&gt;LCK_M_U&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire an Update lock. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL). &lt;/p&gt;  &lt;p&gt;LCK_M_UIX&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire an Update With Intent Exclusive lock. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL). &lt;/p&gt;  &lt;p&gt;LCK_M_X&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to acquire an Exclusive lock. For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL). &lt;/p&gt;  &lt;p&gt;LOGBUFFER&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting for space in the log buffer to store a log record. Consistently high values may indicate that the log devices cannot keep up with the amount of log being generated by the server.&lt;/p&gt;  &lt;p&gt;LOGMGR&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting for any outstanding log I/Os to finish before shutting down the log while closing the database.&lt;/p&gt;  &lt;p&gt;LOGMGR_FLUSH&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;LOGMGR_QUEUE&lt;/p&gt;  &lt;p&gt;Occurs while the log writer task waits for work requests.&lt;/p&gt;  &lt;p&gt;LOGMGR_RESERVE_APPEND&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to see whether log truncation frees up log space to enable the task to write a new log record. Consider increasing the size of the log file(s) for the affected database to reduce this wait.&lt;/p&gt;  &lt;p&gt;LOWFAIL_MEMMGR_QUEUE&lt;/p&gt;  &lt;p&gt;Occurs while waiting for memory to be available for use.&lt;/p&gt;  &lt;p&gt;MIRROR_SEND_MESSAGE&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;MISCELLANEOUS&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;MSQL_DQ&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting for a distributed query operation to finish. This is used to detect potential Multiple Active Result Set (MARS) application deadlocks. The wait ends when the distributed query call finishes.&lt;/p&gt;  &lt;p&gt;MSQL_SYNC_PIPE&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;MSQL_XACT_MGR_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting to obtain ownership of the session transaction manager to perform a session level transaction operation.&lt;/p&gt;  &lt;p&gt;MSQL_XACT_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of transaction usage. A request must acquire the mutex before it can use the transaction.&lt;/p&gt;  &lt;p&gt;MSQL_XP&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting for an extended stored procedure to end. SQL Server uses this wait state to detect potential MARS application deadlocks. The wait stops when the extended stored procedure call ends.&lt;/p&gt;  &lt;p&gt;MSSEARCH&lt;/p&gt;  &lt;p&gt;Occurs during Full-Text Search calls. This wait ends when the full-text operation completes. It does not indicate contention, but rather the duration of full-text operations.&lt;/p&gt;  &lt;p&gt;NET_WAITFOR_PACKET&lt;/p&gt;  &lt;p&gt;Occurs when a connection is waiting for a network packet during a network read.&lt;/p&gt;  &lt;p&gt;OLEDB&lt;/p&gt;  &lt;p&gt;Occurs when SQL Server calls the SQL Server Native Client OLE DB Provider. This wait type is not used for synchronization. Instead, it indicates the duration of calls to the OLE DB provider.&lt;/p&gt;  &lt;p&gt;ONDEMAND_TASK_QUEUE&lt;/p&gt;  &lt;p&gt;Occurs while a background task waits for high priority system task requests. Long wait times indicate that there have been no high priority requests to process, and should not cause concern.&lt;/p&gt;  &lt;p&gt;PAGEIOLATCH_DT&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting on a latch for a buffer that is in an I/O request. The latch request is in Destroy mode. Long waits may indicate problems with the disk subsystem.&lt;/p&gt;  &lt;p&gt;PAGEIOLATCH_EX&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting on a latch for a buffer that is in an I/O request. The latch request is in Exclusive mode. Long waits may indicate problems with the disk subsystem.&lt;/p&gt;  &lt;p&gt;PAGEIOLATCH_KP&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting on a latch for a buffer that is in an I/O request. The latch request is in Keep mode. Long waits may indicate problems with the disk subsystem.&lt;/p&gt;  &lt;p&gt;PAGEIOLATCH_NL&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;PAGEIOLATCH_SH&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting on a latch for a buffer that is in an I/O request. The latch request is in Shared mode. Long waits may indicate problems with the disk subsystem.&lt;/p&gt;  &lt;p&gt;PAGEIOLATCH_UP&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting on a latch for a buffer that is in an I/O request. The latch request is in Update mode. Long waits may indicate problems with the disk subsystem.&lt;/p&gt;  &lt;p&gt;PAGELATCH_DT&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting on a latch for a buffer that is not in an I/O request. The latch request is in Destroy mode.&lt;/p&gt;  &lt;p&gt;PAGELATCH_EX&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting on a latch for a buffer that is not in an I/O request. The latch request is in Exclusive mode.&lt;/p&gt;  &lt;p&gt;PAGELATCH_KP&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting on a latch for a buffer that is not in an I/O request. The latch request is in Keep mode.&lt;/p&gt;  &lt;p&gt;PAGELATCH_NL&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;PAGELATCH_SH&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting on a latch for a buffer that is not in an I/O request. The latch request is in Shared mode.&lt;/p&gt;  &lt;p&gt;PAGELATCH_UP&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting on a latch for a buffer that is not in an I/O request. The latch request is in Update mode.&lt;/p&gt;  &lt;p&gt;PARALLEL_BACKUP_QUEUE&lt;/p&gt;  &lt;p&gt;Occurs when serializing output produced by RESTORE HEADERONLY, RESTORE FILELISTONLY, or RESTORE LABELONLY.&lt;/p&gt;  &lt;p&gt;PRINT_ROLLBACK_PROGRESS&lt;/p&gt;  &lt;p&gt;Used to wait while user processes are ended in a database that has been transitioned by using the ALTER DATABASE termination clause. For more information, see ALTER DATABASE (Transact-SQL).&lt;/p&gt;  &lt;p&gt;QNMANAGER_ACQUIRE&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;QPJOB_KILL&lt;/p&gt;  &lt;p&gt;Indicates that an asynchronous automatic statistics update was canceled by a call to KILL as the update was starting to run. The terminating thread is suspended, waiting for it to start listening for KILL commands. A good value is less than one second.&lt;/p&gt;  &lt;p&gt;QPJOB_WAITFOR_ABORT&lt;/p&gt;  &lt;p&gt;Indicates that an asynchronous automatic statistics update was canceled by a call to KILL when it was running. The update has now completed but is suspended until the terminating thread message coordination is complete. This is an ordinary but rare state, and should be very short. A good value is less than one second.&lt;/p&gt;  &lt;p&gt;QRY_MEM_GRANT_INFO_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs when Query Execution memory management tries to control access to static grant information list. This state lists information about the current granted and waiting memory requests. This state is a simple access control state. There should never be a long wait on this state. If this mutex is not released, all new memory-using queries will stop responding.&lt;/p&gt;  &lt;p&gt;QUERY_EXECUTION_INDEX_SORT_EVENT_OPEN&lt;/p&gt;  &lt;p&gt;Occurs in certain cases when offline create index build is run in parallel, and the different worker threads that are sorting synchronize access to the sort files.&lt;/p&gt;  &lt;p&gt;QUERY_NOTIFICATION_MGR_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of the garbage collection queue in the Query Notification Manager.&lt;/p&gt;  &lt;p&gt;QUERY_NOTIFICATION_SUBSCRIPTION_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs during state synchronization for transactions in Query Notifications. &lt;/p&gt;  &lt;p&gt;QUERY_NOTIFICATION_TABLE_MGR_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs during internal synchronization within the Query Notification Manager.&lt;/p&gt;  &lt;p&gt;QUERY_NOTIFICATION_UNITTEST_MUTEX&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;QUERY_OPTIMIZER_PRINT_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of query optimizer diagnostic output production. This wait type only occurs if diagnostic settings have been enabled under direction of Microsoft Product Support.&lt;/p&gt;  &lt;p&gt;QUERY_TRACEOUT&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;RECOVER_CHANGEDB&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of database status in warm standby database.&lt;/p&gt;  &lt;p&gt;RG_RECONFIG&lt;/p&gt;  &lt;p&gt;Occurs when ALTER RESOURCE GOVERNOR RECONFIGURE or ALTER RESOURCE GOVERNOR DISABLE is called.&lt;/p&gt;  &lt;p&gt;REPL_CACHE_ACCESS&lt;/p&gt;  &lt;p&gt;Occurs during synchronization on a replication article cache. During these waits, the replication log reader stalls, and data definition language (DDL) statements on a published table are blocked.&lt;/p&gt;  &lt;p&gt;REPL_SCHEMA_ACCESS&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of replication schema version information. This state exists when DDL statements are executed on the replicated object, and when the log reader builds or consumes versioned schema based on DDL occurrence.&lt;/p&gt;  &lt;p&gt;REPLICA_WRITES&lt;/p&gt;  &lt;p&gt;Occurs while a task waits for completion of page writes to database snapshots or DBCC replicas.&lt;/p&gt;  &lt;p&gt;REQUEST_DISPENSER_PAUSE&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting for all outstanding I/O to complete, so that I/O to a file can be frozen for snapshot backup.&lt;/p&gt;  &lt;p&gt;REQUEST_FOR_DEADLOCK_SEARCH&lt;/p&gt;  &lt;p&gt;Occurs while the deadlock monitor waits to start the next deadlock search. This wait is expected between deadlock detections, and lengthy total waiting time on this resource does not indicate a problem.&lt;/p&gt;  &lt;p&gt;RESMGR_THROTTLED&lt;/p&gt;  &lt;p&gt;Occurs when a new request comes in and is throttled based on the GROUP_MAX_REQUESTS setting.&lt;/p&gt;  &lt;p&gt;RESOURCE_QUEUE&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of various internal resource queues.&lt;/p&gt;  &lt;p&gt;RESOURCE_SEMAPHORE&lt;/p&gt;  &lt;p&gt;Occurs when a query memory request cannot be granted immediately due to other concurrent queries. High waits and wait times may indicate excessive number of concurrent queries, or excessive memory request amounts.&lt;/p&gt;  &lt;p&gt;RESOURCE_SEMAPHORE_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs while a query waits for its request for a thread reservation to be fulfilled. It also occurs when synchronizing query compile and memory grant requests.&lt;/p&gt;  &lt;p&gt;RESOURCE_SEMAPHORE_QUERY_COMPILE&lt;/p&gt;  &lt;p&gt;Occurs when the number of concurrent query compilations reaches a throttling limit. High waits and wait times may indicate excessive compilations, recompiles, or uncachable plans.&lt;/p&gt;  &lt;p&gt;RESOURCE_SEMAPHORE_SMALL_QUERY&lt;/p&gt;  &lt;p&gt;Occurs when memory request by a small query cannot be granted immediately due to other concurrent queries. Wait time should not exceed more than a few seconds, because the server transfers the request to the main query memory pool if it fails to grant the requested memory within a few seconds. High waits may indicate an excessive number of concurrent small queries while the main memory pool is blocked by waiting queries.&lt;/p&gt;  &lt;p&gt;SEC_DROP_TEMP_KEY&lt;/p&gt;  &lt;p&gt;Occurs after a failed attempt to drop a temporary security key before a retry attempt.&lt;/p&gt;  &lt;p&gt;SERVER_IDLE_CHECK&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of SQL Server instance idle status when a resource monitor is attempting to declare a SQL Server instance as idle or trying to wake up.&lt;/p&gt;  &lt;p&gt;SHUTDOWN&lt;/p&gt;  &lt;p&gt;Occurs while a shutdown statement waits for active connections to exit.&lt;/p&gt;  &lt;p&gt;SLEEP_BPOOL_FLUSH&lt;/p&gt;  &lt;p&gt;Occurs when a checkpoint is throttling the issuance of new I/Os in order to avoid flooding the disk subsystem.&lt;/p&gt;  &lt;p&gt;SLEEP_DBSTARTUP&lt;/p&gt;  &lt;p&gt;Occurs during database startup while waiting for all databases to recover.&lt;/p&gt;  &lt;p&gt;SLEEP_DCOMSTARTUP&lt;/p&gt;  &lt;p&gt;Occurs once at most during SQL Server instance startup while waiting for DCOM initialization to complete.&lt;/p&gt;  &lt;p&gt;SLEEP_MSDBSTARTUP&lt;/p&gt;  &lt;p&gt;Occurs when SQL Trace waits for the &lt;b&gt;msdb&lt;/b&gt; database to complete startup.&lt;/p&gt;  &lt;p&gt;SLEEP_SYSTEMTASK&lt;/p&gt;  &lt;p&gt;Occurs during the start of a background task while waiting for &lt;b&gt;tempdb&lt;/b&gt; to complete startup.&lt;/p&gt;  &lt;p&gt;SLEEP_TASK&lt;/p&gt;  &lt;p&gt;Occurs when a task sleeps while waiting for a generic event to occur.&lt;/p&gt;  &lt;p&gt;SLEEP_TEMPDBSTARTUP&lt;/p&gt;  &lt;p&gt;Occurs while a task waits for &lt;b&gt;tempdb&lt;/b&gt; to complete startup.&lt;/p&gt;  &lt;p&gt;SNI_CRITICAL_SECTION&lt;/p&gt;  &lt;p&gt;Occurs during internal synchronization within SQL Server networking components.&lt;/p&gt;  &lt;p&gt;SNI_HTTP_ACCEPT&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;SNI_HTTP_WAITFOR_0_DISCON&lt;/p&gt;  &lt;p&gt;Occurs during SQL Server shutdown, while waiting for outstanding HTTP connections to exit.&lt;/p&gt;  &lt;p&gt;SOAP_READ&lt;/p&gt;  &lt;p&gt;Occurs while waiting for an HTTP network read to complete.&lt;/p&gt;  &lt;p&gt;SOAP_WRITE&lt;/p&gt;  &lt;p&gt;Occurs while waiting for an HTTP network write to complete.&lt;/p&gt;  &lt;p&gt;SOS_CALLBACK_REMOVAL&lt;/p&gt;  &lt;p&gt;Occurs while performing synchronization on a callback list in order to remove a callback. It is not expected for this counter to change after server initialization is completed.&lt;/p&gt;  &lt;p&gt;SOS_LOCALALLOCATORLIST&lt;/p&gt;  &lt;p&gt;Occurs during internal synchronization in the SQL Server memory manager.&lt;/p&gt;  &lt;p&gt;SOS_MEMORY_USAGE_ADJUSTMENT&lt;/p&gt;  &lt;p&gt;Occurs when memory usage is being adjusted among pools.&lt;/p&gt;  &lt;p&gt;SOS_OBJECT_STORE_DESTROY_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs during internal synchronization in memory pools when destroying objects from the pool.&lt;/p&gt;  &lt;p&gt;SOS_PROCESS_AFFINITY_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs during synchronizing of access to process affinity settings.&lt;/p&gt;  &lt;p&gt;SOS_RESERVEDMEMBLOCKLIST&lt;/p&gt;  &lt;p&gt;Occurs during internal synchronization in the SQL Server memory manager.&lt;/p&gt;  &lt;p&gt;SOS_SCHEDULER_YIELD&lt;/p&gt;  &lt;p&gt;Occurs when a task voluntarily yields the scheduler for other tasks to execute. During this wait the task is waiting for its quantum to be renewed.&lt;/p&gt;  &lt;p&gt;SOS_STACKSTORE_INIT_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of internal store initialization.&lt;/p&gt;  &lt;p&gt;SOS_SYNC_TASK_ENQUEUE_EVENT&lt;/p&gt;  &lt;p&gt;Occurs when a task is started in a synchronous manner. Most tasks in SQL Server are started in an asynchronous manner, in which control returns to the starter immediately after the task request has been placed on the work queue.&lt;/p&gt;  &lt;p&gt;SOS_VIRTUALMEMORY_LOW&lt;/p&gt;  &lt;p&gt;Occurs when a memory allocation waits for a resource manager to free up virtual memory.&lt;/p&gt;  &lt;p&gt;SOSHOST_EVENT&lt;/p&gt;  &lt;p&gt;Occurs when a hosted component, such as CLR, waits on a SQL Server event synchronization object.&lt;/p&gt;  &lt;p&gt;SOSHOST_INTERNAL&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of memory manager callbacks used by hosted components, such as CLR.&lt;/p&gt;  &lt;p&gt;SOSHOST_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs when a hosted component, such as CLR, waits on a SQL Server mutex synchronization object.&lt;/p&gt;  &lt;p&gt;SOSHOST_RWLOCK&lt;/p&gt;  &lt;p&gt;Occurs when a hosted component, such as CLR, waits on a SQL Server reader-writer synchronization object.&lt;/p&gt;  &lt;p&gt;SOSHOST_SEMAPHORE&lt;/p&gt;  &lt;p&gt;Occurs when a hosted component, such as CLR, waits on a SQL Server semaphore synchronization object.&lt;/p&gt;  &lt;p&gt;SOSHOST_SLEEP&lt;/p&gt;  &lt;p&gt;Occurs when a hosted task sleeps while waiting for a generic event to occur. Hosted tasks are used by hosted components such as CLR.&lt;/p&gt;  &lt;p&gt;SOSHOST_TRACELOCK&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of access to trace streams.&lt;/p&gt;  &lt;p&gt;SOSHOST_WAITFORDONE&lt;/p&gt;  &lt;p&gt;Occurs when a hosted component, such as CLR, waits for a task to complete.&lt;/p&gt;  &lt;p&gt;SQLCLR_APPDOMAIN&lt;/p&gt;  &lt;p&gt;Occurs while CLR waits for an application domain to complete startup.&lt;/p&gt;  &lt;p&gt;SQLCLR_ASSEMBLY&lt;/p&gt;  &lt;p&gt;Occurs while waiting for access to the loaded assembly list in the appdomain.&lt;/p&gt;  &lt;p&gt;SQLCLR_DEADLOCK_DETECTION&lt;/p&gt;  &lt;p&gt;Occurs while CLR waits for deadlock detection to complete.&lt;/p&gt;  &lt;p&gt;SQLCLR_QUANTUM_PUNISHMENT&lt;/p&gt;  &lt;p&gt;Occurs when a CLR task is throttled because it has exceeded its execution quantum. This throttling is done in order to reduce the effect of this resource-intensive task on other tasks.&lt;/p&gt;  &lt;p&gt;SQLSORT_NORMMUTEX&lt;/p&gt;  &lt;p&gt;Occurs during internal synchronization, while initializing internal sorting structures.&lt;/p&gt;  &lt;p&gt;SQLSORT_SORTMUTEX&lt;/p&gt;  &lt;p&gt;Occurs during internal synchronization, while initializing internal sorting structures.&lt;/p&gt;  &lt;p&gt;SQLTRACE_BUFFER_FLUSH&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting for a background task to flush trace buffers to disk every four seconds. &lt;/p&gt;  &lt;p&gt;SQLTRACE_LOCK&lt;/p&gt;  &lt;p&gt;Occurs during synchronization on trace buffers during a file trace.&lt;/p&gt;  &lt;p&gt;SQLTRACE_SHUTDOWN&lt;/p&gt;  &lt;p&gt;Occurs while trace shutdown waits for outstanding trace events to complete.&lt;/p&gt;  &lt;p&gt;SQLTRACE_WAIT_ENTRIES&lt;/p&gt;  &lt;p&gt;Occurs while a SQL Trace event queue waits for packets to arrive on the queue.&lt;/p&gt;  &lt;p&gt;SRVPROC_SHUTDOWN&lt;/p&gt;  &lt;p&gt;Occurs while the shutdown process waits for internal resources to be released to shutdown cleanly.&lt;/p&gt;  &lt;p&gt;TEMPOBJ&lt;/p&gt;  &lt;p&gt;Occurs when temporary object drops are synchronized. This wait is rare, and only occurs if a task has requested exclusive access for &lt;b&gt;temp&lt;/b&gt; table drops.&lt;/p&gt;  &lt;p&gt;THREADPOOL&lt;/p&gt;  &lt;p&gt;Occurs when a task is waiting for a worker to run on. This can indicate that the maximum worker setting is too low, or that batch executions are taking unusually long, thus reducing the number of workers available to satisfy other batches.&lt;/p&gt;  &lt;p&gt;TRACEWRITE&lt;/p&gt;  &lt;p&gt;Occurs when the SQL Trace rowset trace provider waits for either a free buffer or a buffer with events to process.&lt;/p&gt;  &lt;p&gt;TRAN_MARKLATCH_DT&lt;/p&gt;  &lt;p&gt;Occurs when waiting for a destroy mode latch on a transaction mark latch. Transaction mark latches are used for synchronization of commits with marked transactions.&lt;/p&gt;  &lt;p&gt;TRAN_MARKLATCH_EX&lt;/p&gt;  &lt;p&gt;Occurs when waiting for an exclusive mode latch on a marked transaction. Transaction mark latches are used for synchronization of commits with marked transactions.&lt;/p&gt;  &lt;p&gt;TRAN_MARKLATCH_KP&lt;/p&gt;  &lt;p&gt;Occurs when waiting for a keep mode latch on a marked transaction. Transaction mark latches are used for synchronization of commits with marked transactions.&lt;/p&gt;  &lt;p&gt;TRAN_MARKLATCH_NL&lt;/p&gt;  &lt;p&gt;Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. &lt;/p&gt;  &lt;p&gt;TRAN_MARKLATCH_SH&lt;/p&gt;  &lt;p&gt;Occurs when waiting for a shared mode latch on a marked transaction. Transaction mark latches are used for synchronization of commits with marked transactions.&lt;/p&gt;  &lt;p&gt;TRAN_MARKLATCH_UP&lt;/p&gt;  &lt;p&gt;Occurs when waiting for an update mode latch on a marked transaction. Transaction mark latches are used for synchronization of commits with marked transactions.&lt;/p&gt;  &lt;p&gt;TRANSACTION_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of access to a transaction by multiple batches.&lt;/p&gt;  &lt;p&gt;UTIL_PAGE_ALLOC&lt;/p&gt;  &lt;p&gt;Occurs when transaction log scans wait for memory to be available during memory pressure.&lt;/p&gt;  &lt;p&gt;VIEW_DEFINITION_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs during synchronization on access to cached view definitions.&lt;/p&gt;  &lt;p&gt;WAIT_FOR_RESULTS&lt;/p&gt;  &lt;p&gt;Occurs when waiting for a query notification to be triggered.&lt;/p&gt;  &lt;p&gt;WAITFOR&lt;/p&gt;  &lt;p&gt;Occurs as a result of a WAITFOR Transact-SQL statement. The duration of the wait is determined by the parameters to the statement. This is a user-initiated wait.&lt;/p&gt;  &lt;p&gt;WAITSTAT_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of access to the collection of statistics used to populate &lt;b&gt;sys.dm_os_wait_stats&lt;/b&gt;.&lt;/p&gt;  &lt;p&gt;WORKTBL_DROP&lt;/p&gt;  &lt;p&gt;Occurs while pausing before retrying, after a failed worktable drop.&lt;/p&gt;  &lt;p&gt;WRITELOG&lt;/p&gt;  &lt;p&gt;Occurs while waiting for a log flush to complete. Common operations that cause log flushes are checkpoints and transaction commits.&lt;/p&gt;  &lt;p&gt;XACT_OWN_TRANSACTION&lt;/p&gt;  &lt;p&gt;Occurs while waiting to acquire ownership of a transaction.&lt;/p&gt;  &lt;p&gt;XACT_RECLAIM_SESSION&lt;/p&gt;  &lt;p&gt;Occurs while waiting for the current owner of a session to release ownership of the session.&lt;/p&gt;  &lt;p&gt;XACTLOCKINFO&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of access to the list of locks for a transaction. In addition to the transaction itself, the list of locks is accessed by operations such as deadlock detection and lock migration during page splits.&lt;/p&gt;  &lt;p&gt;XACTWORKSPACE_MUTEX&lt;/p&gt;  &lt;p&gt;Occurs during synchronization of defections from a transaction, as well as the number of database locks between enlist members of a transaction.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-9113420994871028530?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/9113420994871028530/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=9113420994871028530" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/9113420994871028530?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/9113420994871028530?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/bjpbkfTuHBI/sysdmoswaitstats.html" title="sys.dm_os_wait_stats" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2009/01/sysdmoswaitstats.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMHQX0_fip7ImA9WxRVFUw.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-5770765381048400115</id><published>2008-11-12T15:10:00.001-03:00</published><updated>2008-11-12T15:10:30.346-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-12T15:10:30.346-03:00</app:edited><title>Delayed Write Message on SQL Server</title><content type="html">&lt;p&gt;&lt;em&gt;I was looking for some the messages mentioned by an incident and i found one that is quite common that SQL is taking more time to complete an io request. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;So i found some good explanation on SQL Server Storage Engine blog.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Credits for them&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;-------------------------------------------------------------------------------&lt;/p&gt;  &lt;p&gt;SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [T:\MSSQL\DATA\tempdb.mdf] in database [tempdb] (2).&amp;#160; The OS file handle is 0x00000838.&amp;#160; The offset of the latest long I/O is: 0x000000ebdc0000&lt;/p&gt;  &lt;p&gt;You may hear this referred to as a stalled IO. I see questions on this warning message quite a bit, mostly about what&amp;#8217;s wrong with SQL Server and why is SQL taking so long to read or write to the disk. Let me explain why this isn&amp;#8217;t a SQL Server problem.&lt;/p&gt;  &lt;p&gt;SQL Server does data file reads and writes almost exclusively as asynchronous IO, using the win32 APIs ReadFile, WriteFile, ReadFileScatter and WriteFileGather. Each of these APIs behave in a fairly similar manner &amp;#8211; the caller sends in a handle to the file, some memory location to read or write, the size of the block and a structure that tells the kernel how to handle the IO. In SQL Server&amp;#8217;s case the how to handle the IO is Asynchronously, please. The call returns immediately so that the thread issuing the IO can get out of the way and make life happy for some other user who&amp;#8217;d also like their query to return.&lt;/p&gt;  &lt;p&gt;The catch here is that ordinarily the time between the Asynchronous call to read or write and the completion of the read or write should be on the order of 10ms. Of course the longer it takes for an IO to return the more noticeable a performance impact there is to end users.&lt;/p&gt;  &lt;p&gt;Prior to SQL Server 2000 SP4 the only way you would be able to tell if your IOs were taking longer than expected would be to use System Monitor and watch the PhysicalDisk\Avg Disk sec./read, write and transfer counter. This is a relatively acceptable method when the cause of your IO bottleneck is the latency of the physical disk, you might be surprised to find out that&amp;#8217;s not the only thing that might slow down an IO!&lt;/p&gt;  &lt;p&gt;Once a user mode application issues an IO request it&amp;#8217;s the equivalent of putting a package in the mail, there&amp;#8217;s nothing to do but wait. While you may not have anything to do once you&amp;#8217;ve dropped the package the parcel carriers job has just begun, what with all the processing and labeling and transit &amp;#8211; you get the idea. Likewise for the kernel. Once an IO transitions over to kernel mode it&amp;#8217;s transformed into something called and IRP (interrupt request packet) and begins a trek down levels of filter drivers, virus scanners and device drivers before it finally makes its way home to a physical device.&lt;/p&gt;  &lt;p&gt;Windows exposes methods for device and software manufactures to be notified of, and participate in, IOs. Filter drivers are one method of doing this, and it allows for great functionality of verifying you aren&amp;#8217;t writing a file with a virus pattern, or backing up a file as it&amp;#8217;s being written. The problem here is that the filter driver can hold up an IO for an extended period of time, and this time isn&amp;#8217;t reflected in the Sysmon counter.&lt;/p&gt;  &lt;p&gt;So what are you to do? You&amp;#8217;ve put your specially crafted package in the mail, but the intended recipient still hasn&amp;#8217;t got it.&lt;/p&gt;  &lt;p&gt;The approach taken in SQL Server is to make note of the time the IO started, the offset of the IO within the file then check back a short time later to make sure all IOs have completed. If an IO is still outstanding and 15 seconds have elapsed then the warning is printed to the errorlog to alert the system administrator that something&amp;#8217;s amiss.&lt;/p&gt;  &lt;p&gt;When you see this message the first action should still be to have a look at the physical disk counters in sysmon to ensure that the disks are servicing IOs in a reasonable period of time. If those appear to fine then start looking at what filter drivers might be installed on your system, and if there are any known issues with them, or disable them if you don&amp;#8217;t need them.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-5770765381048400115?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/5770765381048400115/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=5770765381048400115" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/5770765381048400115?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/5770765381048400115?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/hzkmYlLtmF8/delayed-write-message-on-sql-server.html" title="Delayed Write Message on SQL Server" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/11/delayed-write-message-on-sql-server.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cMQHwzfCp7ImA9WxRWGU0.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-1568277774670325095</id><published>2008-11-05T14:11:00.001-03:00</published><updated>2008-11-05T14:11:21.284-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-05T14:11:21.284-03:00</app:edited><title>Table type parameters</title><content type="html">&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I was reading some artible and remembering...&lt;/p&gt;  &lt;p&gt;One thing that my students always asked me, was &amp;quot;we can create a variable that is a table. How come can&amp;#180;t we assign a parameter to a function that is a table type?&amp;quot; Well, in SQL 2005 the problem is that is not possible to define inside the procedure one parameter that is a table.&lt;/p&gt;  &lt;p&gt;Well on SQL 2008 now we can. There is an new element User-Defined Table Type. Is a data type that is actually a table definition. Look:&lt;/p&gt;  &lt;p&gt;USE AdventureWorks2000    &lt;br /&gt;GO &lt;/p&gt;  &lt;p&gt;-- Create the data type   &lt;br /&gt;CREATE TYPE dbo.SalesOrderItemType AS TABLE     &lt;br /&gt;(    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; SalesOrderID&amp;#160;&amp;#160;&amp;#160; int,    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; LineNumber&amp;#160;&amp;#160;&amp;#160; tinyint,    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ProductID&amp;#160;&amp;#160;&amp;#160; int,    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; SpecialOfferID&amp;#160;&amp;#160;&amp;#160; int,    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; CarrierTrackingNumber&amp;#160;&amp;#160;&amp;#160; nvarchar,    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; OrderQty&amp;#160;&amp;#160;&amp;#160; smallint,    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; UnitPrice&amp;#160;&amp;#160;&amp;#160; money,    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; UnitPriceDiscount&amp;#160;&amp;#160;&amp;#160; float,    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ModifiedDate&amp;#160;&amp;#160;&amp;#160; datetime,    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; rowguid&amp;#160;&amp;#160;&amp;#160; uniqueidentifier,    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; LineTotal&amp;#160;&amp;#160;&amp;#160; float    &lt;br /&gt;)    &lt;br /&gt;GO&lt;/p&gt;  &lt;p&gt;So you can create a procedure like this&lt;/p&gt;  &lt;p&gt;CREATE PROCEDURE usp_insert_SalesOrderItem( @SalesItem dbo.SalesOrderItemType READONLY)   &lt;br /&gt;AS &lt;/p&gt;&amp;#160;&amp;#160; ... put some code here  &lt;br /&gt;  &lt;p&gt;GO&lt;/p&gt;  &lt;p&gt;In this way, you create a procedure that receives a table variagle as a parameter, the table variable passed as argument for that must comply with the same data type, to have the same columns.&lt;/p&gt;  &lt;p&gt;Besides, the paramter received must have, in the stored procedure definition the &lt;u&gt;readonly&lt;/u&gt; clause meaning that the table must have the ge only read.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;HAve fun! Remember, try to get rid of cursors, use this kind of instrument to not use cursors on your procedures or other code.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-1568277774670325095?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/1568277774670325095/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=1568277774670325095" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/1568277774670325095?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/1568277774670325095?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/YJwF_5yw3H8/table-type-parameters.html" title="Table type parameters" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/11/table-type-parameters.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MCRn09eCp7ImA9WxRQFUo.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-5005460676810071290</id><published>2008-10-09T13:57:00.001-03:00</published><updated>2008-10-09T13:57:47.360-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-09T13:57:47.360-03:00</app:edited><title>Microsoft supports SQL Server in Virtualized Environment</title><content type="html">&lt;p&gt;I was taking a look at the PSS Engineers blog, found out many interesting things there. &lt;/p&gt;  &lt;p&gt;Specially that sql server is being supported on a&amp;#160; virtualized environment, microsoft has changed the policy for that.&lt;/p&gt;  &lt;p&gt;take a look at this article.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://support.microsoft.com/kb/956893/en-us" href="http://support.microsoft.com/kb/956893/en-us"&gt;http://support.microsoft.com/kb/956893/en-us&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;enjoy&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-5005460676810071290?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/5005460676810071290/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=5005460676810071290" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/5005460676810071290?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/5005460676810071290?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/4xiXjseJ-ho/microsoft-supports-sql-server-in.html" title="Microsoft supports SQL Server in Virtualized Environment" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/10/microsoft-supports-sql-server-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEACR3o6fCp7ImA9WxRQFE0.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-378577242329118799</id><published>2008-10-07T16:12:00.001-03:00</published><updated>2008-10-07T16:12:46.414-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-07T16:12:46.414-03:00</app:edited><title>Microsoft SQL Server 2008 Cumulative Update</title><content type="html">&lt;p&gt;&lt;a title="http://support.microsoft.com/kb/956717/en-us" href="http://support.microsoft.com/kb/956717/en-us"&gt;http://support.microsoft.com/kb/956717/en-us&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;from pss engineers blog.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-378577242329118799?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/378577242329118799/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=378577242329118799" title="1 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/378577242329118799?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/378577242329118799?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/RlRi-o5VxWs/microsoft-sql-server-2008-cumulative.html" title="Microsoft SQL Server 2008 Cumulative Update" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/10/microsoft-sql-server-2008-cumulative.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIDQ387eCp7ImA9WxZVGUo.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-8501002227349401066</id><published>2008-03-31T10:36:00.001-03:00</published><updated>2008-03-31T10:36:12.100-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-31T10:36:12.100-03:00</app:edited><title>SQL Server Builds list</title><content type="html">&lt;p&gt;This is quite insteresting. I'm posting an excerpt from Microsoft support about the Sql server builds released&lt;/p&gt; &lt;p&gt;for more detail take a look at &lt;a title="http://support.microsoft.com/kb/937137/en-us" href="http://support.microsoft.com/kb/937137/en-us"&gt;http://support.microsoft.com/kb/937137/en-us&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h5&gt;Build in progress&lt;/h5&gt;This cumulative update package is currently under development. &lt;br&gt;The parent build of this build will be determined as soon as this build is released. &lt;br&gt;For more information about this build, click the following article number to view the article in the Microsoft Knowledge Base:  &lt;p&gt;&lt;a href="http://support.microsoft.com/kb/949095/"&gt;949095&lt;/a&gt; (http://support.microsoft.com/kb/949095/) Cumulative update package 7 for SQL Server 2005 Service Pack 2  &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3228 (cumulative update)&lt;/h5&gt;This cumulative update package was released on February 18, 2008. &lt;br&gt;The parent build of this build is 09.00.3215. &lt;br&gt;For more information about the SQL Server 2005 post-Service Pack 2 hotfixes that are included in this build, click the following article number to view the article in the Microsoft Knowledge Base:  &lt;p&gt;&lt;a href="http://support.microsoft.com/kb/946608/"&gt;946608&lt;/a&gt; (http://support.microsoft.com/kb/946608/) Cumulative update package 6 for SQL Server 2005 Service Pack 2  &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3215 (cumulative update)&lt;/h5&gt;This cumulative update package was released on December 17, 2007. &lt;br&gt;The parent build of this build is 09.00.3200. &lt;br&gt;For more information about the SQL Server 2005 post-Service Pack 2 hotfixes that are included in this build, click the following article number to view the article in the Microsoft Knowledge Base:  &lt;p&gt;&lt;a href="http://support.microsoft.com/kb/943656/"&gt;943656&lt;/a&gt; (http://support.microsoft.com/kb/943656/) Cumulative update package 5 for SQL Server 2005 Service Pack 2  &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3209&lt;/h5&gt;This on-demand build was released on November 20, 2007. &lt;br&gt;The parent build of this build is 09.00.3208. &lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;SQL Hotfix bug number&lt;br&gt;Knowledge Base article number&lt;br&gt;Description &lt;p&gt;50002118&lt;br&gt;Contention occurs on a CMEMTHREAD wait type or on a spinlock. &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3208 &lt;/h5&gt;This on-demand build was released on November 15, 2007. &lt;br&gt;The parent build of this build is 09.00.3206. &lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;SQL Hotfix bug number&lt;br&gt;Knowledge Base article number&lt;br&gt;Description &lt;p&gt;50002030&lt;br&gt;A CMEMTHREAD wait type causes high CPU utilization to occur under a load. &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3206&lt;/h5&gt;This on-demand build was released on November 8, 2007. &lt;br&gt;The parent build of this build is 09.00.3205. &lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;SQL Hotfix bug number&lt;br&gt;Knowledge Base article number&lt;br&gt;Description &lt;p&gt;50001986&lt;br&gt;A feature has been added that logs silent conflicts that are caused by divergent metadata.  &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3205&lt;/h5&gt;This on-demand build was released on November 7, 2007. &lt;br&gt;The parent build of this build is 09.00.3203. &lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;SQL Hotfix bug number&lt;br&gt;Knowledge Base article number&lt;br&gt;Description &lt;p&gt;50001708&lt;br&gt;In SQL Server Management Studio, you cannot change the password for the db_securityadmin database role if the old password is not specified. &lt;p&gt;50001999&lt;br&gt;You cannot return to the original report in Windows Internet Explorer 7 after you open a report that accepts one or more DateTime parameters. &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3203&lt;/h5&gt;This on-demand build was released on September 30, 2007. &lt;br&gt;The parent build of this build is 09.00.3200. &lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;SQL Hotfix bug number&lt;br&gt;Knowledge Base article number&lt;br&gt;Description &lt;p&gt;50001951&lt;br&gt;In SQL Server Management Studio, you cannot change the password for the db_securityadmin database role if the old password is not specified. &lt;p&gt;50001993&lt;br&gt;You cannot return to the original report in Internet Explorer 7 after you open a report that accepts one or more DateTime parameters. &lt;p&gt;50001997&lt;br&gt;The new batching model that was introduced in SQL Server 2005 SP2 causes an out-of-memory exception when you run the Rebuild Index Task. &lt;p&gt;50001998&lt;br&gt;Event ID 17055 messages that an instance of SQL Server 2000 forwards to an instance of SQL Server 2005 are not received by the instance of SQL Server 2005. &lt;p&gt;50002000 (This bug is a variation of bug number 50000314.)&lt;br&gt;The &lt;strong&gt;Save&lt;/strong&gt; dialog box in Report Builder stops responding in SQL Server 2005 SP2. This problem occurs if you start Report Builder when a report name is specified in the URL in Report Builder. &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3200 (cumulative update)&lt;/h5&gt;This cumulative update package was released on October 15, 2007.&lt;br&gt;The parent build of this build is 09.00.3195.&lt;br&gt;For more information about the SQL Server 2005 post-Service Pack 2 hotfixes that are included in this build, click the following article number to view the article in the Microsoft Knowledge Base:  &lt;p&gt;&lt;a href="http://support.microsoft.com/kb/941450/"&gt;941450&lt;/a&gt; (http://support.microsoft.com/kb/941450/) Cumulative update package 4 for SQL Server 2005 Service Pack 2  &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3195 &lt;/h5&gt;This on-demand build was released on September 19, 2007.&lt;br&gt;The parent build of this build is 09.00.3194.&lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;SQL Hotfix bug number&lt;br&gt;Knowledge Base article number&lt;br&gt;Description &lt;p&gt;50001812 &lt;br&gt;A null reference exception occurs when you set parameters on a Web part that is linked to a document library part. &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3194 &lt;/h5&gt;This on-demand build was released on September 11, 2007.&lt;br&gt;The parent build of this build is 09.00.3186.&lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;SQL Hotfix bug number&lt;br&gt;Knowledge Base article number&lt;br&gt;Description &lt;p&gt;50001766 &lt;br&gt;&lt;a href="http://support.microsoft.com/kb/942087/"&gt;942087&lt;/a&gt; (http://support.microsoft.com/kb/942087/)&lt;br&gt;A C# application that was built by using SQL Server 2005 Integration Services build 9.00.3042 crashes, and an access violation occurs inDtspipeline.dll. &lt;p&gt;50001619 &lt;br&gt;An internal exception occurs when when you process indexes. &lt;p&gt;50001625 &lt;br&gt;In SQL Server 2005 Analysis Services Service Pack 2 (SP2), you experience frequent access violations in the &lt;b&gt;PFCompressIterator::DecompressArray&lt;/b&gt; function under stress conditions.  &lt;p&gt;50001713 &lt;br&gt;Report Manager drill-down (+/-) does not work consistently with Snapshots. &lt;p&gt;50001550 &lt;br&gt;Merge non-convergence occurs between the Republisher and the Publisher.  &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3186 (cumulative update)&lt;/h5&gt;This cumulative update package was released on August 20, 2007.&lt;br&gt;The parent build of this build is 09.00.3182.&lt;br&gt;For more information about the SQL Server 2005 post-Service Pack 2 hotfixes that are included in this build, click the following article number to view the article in the Microsoft Knowledge Base:  &lt;p&gt;&lt;a href="http://support.microsoft.com/kb/939537/"&gt;939537&lt;/a&gt; (http://support.microsoft.com/kb/939537/) Cumulative update package 3 for SQL Server 2005 Service Pack 2  &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3182&lt;/h5&gt;This build is no longer available. Please use build 3186 or higher. This on-demand build was released on July 17, 2007.&lt;br&gt;The parent build of this build is 09.00.3180.&lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;&lt;b&gt;SQL Hotfix bug number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Knowledge Base article number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Description&lt;/b&gt; &lt;p&gt;50001298&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/938712/"&gt;938712&lt;/a&gt; (http://support.microsoft.com/kb/938712/)&lt;br&gt;In Analysis Services 2005, a full process of a database may not process all the records for some dimensions &lt;p&gt;50001324&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/940129/"&gt;940129&lt;/a&gt; (http://support.microsoft.com/kb/940129/)&lt;br&gt;An MDX query may not return results unless "non empty" is specified with the dimension that has unnatural hierarchy &lt;p&gt;50001440&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/940128/"&gt;940128&lt;/a&gt; (http://support.microsoft.com/kb/940128/)&lt;br&gt;SQL Server may fail to generate a plan for a complex query that involves cursors and error 8623 occurs &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3180&lt;/h5&gt;This build is no longer available. Please use build 3186 or higher. This on-demand build was released on July 11, 2007.&lt;br&gt;The parent build of this build is 09.00.3179.&lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;&lt;b&gt;SQL Hotfix bug number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Knowledge Base article number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Description&lt;/b&gt; &lt;p&gt;50001392&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/939942/"&gt;939942&lt;/a&gt; (http://support.microsoft.com/kb/939942/)&lt;br&gt;FIX: You receive an error message when you try to access a report after you configure SQL Server 2005 Reporting Services to run under the SharePoint integrated mode &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3179&lt;/h5&gt;This build is no longer available. Please use build 3186 or higher. This on-demand build was released on July 11, 2007.&lt;br&gt;The parent build of this build is 09.00.3178.&lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;&lt;b&gt;SQL Hotfix bug number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Knowledge Base article number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Description&lt;/b&gt; &lt;p&gt;50001482&lt;br&gt;The TokenAndPermUserStore cache store may continue to grow steadily and decrease performance &lt;p&gt;50001194&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/938243/"&gt;938243&lt;/a&gt; (http://support.microsoft.com/kb/938243/)&lt;br&gt;Executing a full-text query against a catalog that is being rebuilt may fail with index corruption errors &lt;p&gt;&amp;nbsp; &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3178&lt;/h5&gt;This build is no longer available. Please use build 3186 or higher. This on-demand build was released on July 5, 2007.&lt;br&gt;The parent build of this build is 09.00.3177.&lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;&lt;b&gt;SQL Hotfix bug number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Knowledge Base article number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Description&lt;/b&gt; &lt;p&gt;50001193&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/938086/"&gt;938086&lt;/a&gt; (http://support.microsoft.com/kb/938086/)&lt;br&gt;Running concurrent SQL Server Agent jobs in the context of proxy account may fail with errors &lt;p&gt;50001352&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/938086/"&gt;938086&lt;/a&gt; (http://support.microsoft.com/kb/938086/)&lt;br&gt;Running concurrent SQL Server Agent jobs in the context of proxy account may fail with errors &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3177&lt;/h5&gt;This build is no longer available. Please use build 3186 or higher. This on-demand build was released on June 29, 2007.&lt;br&gt;The parent build of this build is 09.00.3175.&lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;&lt;b&gt;SQL Hotfix bug number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Knowledge Base article number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Description&lt;/b&gt; &lt;p&gt;50001391&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/939562/"&gt;939562&lt;/a&gt; (http://support.microsoft.com/kb/939562/)&lt;br&gt;A query that contains an INSTEAD OF trigger may fail with error 8624 in SQL Server 2005 SP2 &lt;p&gt;50001367&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/938363/"&gt;938363&lt;/a&gt; (http://support.microsoft.com/kb/938363/)&lt;br&gt;Non-convergence may occur in merge replication when there are join filters for partition groups and the articles belong to multiple publications &lt;p&gt;50001379&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/939285/"&gt;939285&lt;/a&gt; (http://support.microsoft.com/kb/939285/)&lt;br&gt;An incorrect error message may be returned by the SQL Native Client provider when in sync mode and there is a query time-out &lt;p&gt;50001408&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/939564/"&gt;939564&lt;/a&gt; (http://support.microsoft.com/kb/939564/)&lt;br&gt;Querying a text column that contains more than 1,024 characters may return incorrect results when you use the SQL Native Client provider &lt;p&gt;50001397&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/939563/"&gt;939563&lt;/a&gt; (http://support.microsoft.com/kb/939563/)&lt;br&gt;An UPDATE query or a DELETE query in a Merge Replication topology may fail with error 8152 &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3175 (cumulative update)&lt;/h5&gt;This cumulative update package was released on June 18, 2007. &lt;br&gt;The parent build of this build is 09.00.3166. For more information about the SQL Server 2005 post-Service Pack 2 hotfixes that are included in this build, click the following article number to view the article in the Microsoft Knowledge Base:  &lt;p&gt;&lt;a href="http://support.microsoft.com/kb/936305/"&gt;936305&lt;/a&gt; (http://support.microsoft.com/kb/936305/) Cumulative update package 2 for SQL Server 2005 Service Pack 2 is available  &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3169&lt;/h5&gt;This on-demand build was released on May 18, 2007.&lt;br&gt;The parent build of this build is 09.00.3166. &lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;&lt;b&gt;SQL Hotfix bug number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Knowledge Base article number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Description&lt;/b&gt; &lt;p&gt;50001251&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/937041/"&gt;937041&lt;/a&gt; (http://support.microsoft.com/kb/937041/)&lt;br&gt;FIX: Changes in the publisher database are not replicated to the subscribers in a transactional replication if the publisher database runs exposed in a database mirroring session in SQL Server 2005  &lt;p&gt;50001248&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/937033/"&gt;937033&lt;/a&gt; (http://support.microsoft.com/kb/937033/)&lt;br&gt;FIX: Error message when you run a linked server query in SQL Server 2005: "The oledbprovider unisys.dmsII.1 for linkserver '&amp;lt;ServerName&amp;gt;' reported an error the provider ran out of memory" &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3166&lt;/h5&gt;This on-demand build was released on May 7, 2007.&lt;br&gt;The parent build of this build is 09.00.3162. &lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;&lt;b&gt;SQL Hotfix bug number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Knowledge Base article number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Description&lt;/b&gt; &lt;p&gt;50001020&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/936185/"&gt;936185&lt;/a&gt; (http://support.microsoft.com/kb/936185/)&lt;br&gt;FIX: Blocking and performance problems may occur when you enable trace flag 1118 in SQL Server 2005 if the temporary table creation workload is high &lt;p&gt;50000726&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/932106/"&gt;932106&lt;/a&gt; (http://support.microsoft.com/kb/932106/)&lt;br&gt;FIX: Error message when you run a DMX query that uses a linked server to query data from an instance of Analysis Services in SQL Server 2005: "The following system error occurred: Logon failure: unknown user name or bad password"  &lt;p&gt;50001024&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/934734/"&gt;934734&lt;/a&gt; (http://support.microsoft.com/kb/934734/)&lt;br&gt;FIX: A database is marked as suspect when you update a table that contains a nonclustered index in SQL Server 2005 &lt;p&gt;50000924&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/936863/"&gt;936863&lt;/a&gt; (http://support.microsoft.com/kb/936863/)&lt;br&gt;FIX: Some MDX queries may run slower and consume more memory after you install SQL Server 2005 Analysis Services Service Pack 2 &lt;p&gt;50000925&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/936262/"&gt;936262&lt;/a&gt; (http://support.microsoft.com/kb/936262/)&lt;br&gt;In SQL Server 2005 Analysis Services, the cache is cleaned even though the memory usage is less than the &lt;b&gt;LowMemoryLimit&lt;/b&gt; property that is configured. &lt;p&gt;50000898&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/936261/"&gt;936261&lt;/a&gt; (http://support.microsoft.com/kb/936261/)&lt;br&gt;FIX: The process stops responding and the CPU utilization reaches 100 percent when you process a partition in SQL Server 2005 Analysis Services &lt;p&gt;50000802&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/932180/"&gt;932180&lt;/a&gt; (http://support.microsoft.com/kb/932180/)&lt;br&gt;FIX: The Cluster Discrimination tab is empty when you browse a clustering model of SQL Server 2005 Analysis Services in SQL Server BIDS &lt;p&gt;50000920&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/935341/"&gt;935341&lt;/a&gt; (http://support.microsoft.com/kb/935341/)&lt;br&gt;FIX: Error message when you run an MDX query against a measure in SQL Server 2005 Analysis Services: "An internal error has occurred" &lt;p&gt;50000732&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/932331/"&gt;932331&lt;/a&gt; (http://support.microsoft.com/kb/932331/)&lt;br&gt;You receive an error message when you try to build a mining model that contains lots of data on a 32-bit server that is running SQL Server 2005 Analysis Services. &lt;p&gt;50000890&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/936254/"&gt;936254&lt;/a&gt; (http://support.microsoft.com/kb/936254/)&lt;br&gt;FIX: An MDX query may be slow if it reads from an aggregation that has less than 4,096 records in SQL Server 2005 Analysis Services &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3162&lt;/h5&gt;This on-demand build was released on April 23, 2007. &lt;br&gt;The parent build of this build is 09.00.3156.&lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;&lt;b&gt;SQL Hotfix bug number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Knowledge Base article number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Description&lt;/b&gt; &lt;p&gt;50001001&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/932610/"&gt;932610&lt;/a&gt; (http://support.microsoft.com/kb/932610/)&lt;br&gt;FIX: Error message when you run an MDX query in SQL Server 2005 Analysis Services: "An unexpected error occurred (file 'pffilestore.cpp', line 3267, function 'PFFileStore::HandleDataPageFault')"  &lt;p&gt;50001056&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/935922/"&gt;935922&lt;/a&gt; (http://support.microsoft.com/kb/935922/)&lt;br&gt;FIX: Error message when you install Microsoft Dynamics CRM 3.0: "Setup failed to validate specified Reporting Services Report Server" &lt;p&gt;50000926&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/935360/"&gt;935360&lt;/a&gt; (http://support.microsoft.com/kb/935360/)&lt;br&gt;FIX: Error message when you run an MDX query that retrieves data from an Analysis Services database: "An error occurred while the dimension, with the ID of '&amp;lt;DatabaseName&amp;gt;', Name of '&amp;lt;DimensionName&amp;gt;' was being processed" &lt;p&gt;50000923&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/935829/"&gt;935829&lt;/a&gt; (http://support.microsoft.com/kb/935829/)&lt;br&gt;FIX: You receive incorrect results when you run an MDX query against a dimension that contains a parent-child hierarchy in SQL Server 2005 Analysis Services  &lt;p&gt;50000871&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/935830/"&gt;935830&lt;/a&gt; (http://support.microsoft.com/kb/935830/)&lt;br&gt;FIX: A server may start slowly if you have SQL Server 2005 Analysis Services installed and if many objects are stored on the server &lt;p&gt;50000927&lt;br&gt;A value from the SQL Server 2005 Analysis Services database may be larger than the value from the source database. &lt;p&gt;50000899&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/935831/"&gt;935831&lt;/a&gt; (http://support.microsoft.com/kb/935831/)&lt;br&gt;When you configure proactive caching for a partition in SQL Server 2005 Analysis Services, the underlying partition may be processed two times during a proactive caching update. &lt;p&gt;50000885&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/935832/"&gt;935832&lt;/a&gt; (http://support.microsoft.com/kb/935832/)&lt;br&gt;FIX: You cannot cancel an MDX query that runs for a long time in SQL Server 2005 Analysis Services &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3161 (cumulative update)&lt;/h5&gt;This cumulative update package was released on April 16, 2007. &lt;br&gt;The parent build of this build is 09.00.3156.&lt;br&gt;For more information about the SQL Server 2005 post-Service Pack 2 hotfixes that are included in this build, click the following article number to view the article in the Microsoft Knowledge Base:  &lt;p&gt;&lt;a href="http://support.microsoft.com/kb/935356/"&gt;935356&lt;/a&gt; (http://support.microsoft.com/kb/935356/) Cumulative update package (build 3161) for SQL Server 2005 Service Pack 2 is available  &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3159&lt;/h5&gt;This on-demand build was released on April 4, 2007.&lt;br&gt;The parent build of this build is 09.00.3156. &lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfix.  &lt;p&gt;&lt;b&gt;SQL Hotfix bug number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Knowledge Base article number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Description&lt;/b&gt; &lt;p&gt;50001012&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/934459/"&gt;934459&lt;/a&gt; (http://support.microsoft.com/kb/934459/)&lt;br&gt;FIX: The Check Database Integrity task and the Execute T-SQL Statement task in a maintenance plan may lose database context in certain circumstances in SQL Server 2005 builds 3150 through 3158  &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3156&lt;/h5&gt;This cumulative update package was released on March 23, 2007. &lt;br&gt;The parent build of this build is 09.00.3155.&lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfix.  &lt;p&gt;&lt;b&gt;SQL Hotfix bug number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Knowledge Base article number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Description&lt;/b&gt; &lt;p&gt;50000958&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/934226/"&gt;934226&lt;/a&gt; (http://support.microsoft.com/kb/934226/)&lt;br&gt;FIX: Error message when you try to use Database Mail to send an e-mail message in SQL Server 2005: "profile name is not valid (Microsoft SQL Server, Error 14607)"  &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3155&lt;/h5&gt;This on-demand build was released on March 21, 2007. &lt;br&gt;The parent build of this build is 09.00.3154.&lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;&lt;b&gt;SQL Hotfix bug number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Knowledge Base article number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Description&lt;/b&gt; &lt;p&gt;50000900&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/933549/"&gt;933549&lt;/a&gt; (http://support.microsoft.com/kb/933549/)&lt;br&gt;FIX: You may receive an access violation when you perform a bulk copy operation in SQL Server 2005  &lt;p&gt;50000964&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/933724/"&gt;933724&lt;/a&gt; (http://support.microsoft.com/kb/933724/)&lt;br&gt;FIX: The query performance is slow when you run a query that uses a user-defined scalar function against an instance of SQL Server 2005  &lt;p&gt;50000875&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/932115/"&gt;932115&lt;/a&gt; (http://support.microsoft.com/kb/932115/)&lt;br&gt;FIX: The ghost row clean-up thread does not remove ghost rows on some data files of a database in SQL Server 2005  &lt;p&gt;50000969&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/933766/"&gt;933766&lt;/a&gt; (http://support.microsoft.com/kb/933766/)&lt;br&gt;FIX: Failed assertion message in the Errorlog file when you perform various operations in SQL Server 2005: "Failed Assertion = 'fFalse' Attempt to access expired blob handle (3)" &lt;p&gt;50000919&lt;br&gt;When you run an encrypted stored procedure, error 565 may occur. The error message for error 565 is as follows: "A stack overflow occurred in the server while compiling the query. Please simplify the query." &lt;p&gt;50000918&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/933808/"&gt;933808&lt;/a&gt; (http://support.microsoft.com/kb/933808/)&lt;br&gt;FIX: Error message when you run a query that contains nested FOR XML clauses in SQL Server 2005: "The XML data type is damaged" &lt;p&gt;50000921&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/933499/"&gt;933499&lt;/a&gt; (http://support.microsoft.com/kb/933499/)&lt;br&gt;FIX: Error message when you use transactional replication to replicate the execution of stored procedures to subscribers in SQL Server 2005: "Insufficient memory to run query"  &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3154&lt;/h5&gt;This on-demand build was released on March 21, 2007. &lt;br&gt;The parent build of this build is 09.00.3153.&lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfixes.  &lt;p&gt;&lt;b&gt;SQL Hotfix bug number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Knowledge Base article number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Description&lt;/b&gt; &lt;p&gt;50000948&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/934106/"&gt;934106&lt;/a&gt; (http://support.microsoft.com/kb/934106/)&lt;br&gt;FIX: SQL Server 2005 database engine generates failed assertion errors when you use the Replication Monitor to monitor the distribution database &lt;p&gt;50000952&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/934188/"&gt;934188&lt;/a&gt; (http://support.microsoft.com/kb/934188/)&lt;br&gt;FIX: The Distribution Agent does not deliver commands to the Subscriber even if the Distribution Agent is running in SQL Server 2005  &lt;p&gt;50000949&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/934109/"&gt;934109&lt;/a&gt; (http://support.microsoft.com/kb/934109/)&lt;br&gt;FIX: The Distribution Agent generates an access violation when you configure a transactional replication publication to run an additional script after the snapshot is applied at the subscriber in SQL Server 2005  &lt;p&gt;50000960&lt;br&gt;A content query from the Data Mining Client for Excel add-in may take a long time to display the result set. This problem occurs especially when the result set is large. Microsoft Office Excel may appear to stop responding (hang) when the query is running. &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3153&lt;/h5&gt;This on-demand build was released on March 15, 2007. &lt;br&gt;The parent build of this build is 09.00.3152.&lt;br&gt;This build contains the following SQL Server 2005 post-SP2 hotfix.  &lt;p&gt;&lt;b&gt;SQL Hotfix bug number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Knowledge Base article number&lt;/b&gt;&lt;br&gt;&lt;b&gt;Description&lt;/b&gt; &lt;p&gt;50000945&lt;br&gt;&lt;a href="http://support.microsoft.com/kb/933564/"&gt;933564&lt;/a&gt; (http://support.microsoft.com/kb/933564/)&lt;br&gt;FIX: A gradual increase in memory consumption for the USERSTORE_TOKENPERM cache store occurs in SQL Server 2005 &lt;p&gt;&amp;nbsp; &lt;h5&gt;Build 09.00.3152&lt;/h5&gt;This cumulative hotfix package was released on March 15, 2007. &lt;br&gt;The parent build of this build is SQL Server 2005 SP2 (09.00.3042). &lt;br&gt;For more information about the SQL Server 2005 post-Service Pack 2 hotfixes that are included in this build, click the following article number to view the article in the Microsoft Knowledge Base:  &lt;p&gt;&lt;a href="http://support.microsoft.com/kb/933097/"&gt;933097&lt;/a&gt; (http://support.microsoft.com/kb/933097/) Cumulative hotfix package (build 3152) for SQL Server 2005 Service Pack 2 is available &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-8501002227349401066?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/8501002227349401066/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=8501002227349401066" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/8501002227349401066?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/8501002227349401066?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/IShE7Rj3OQc/sql-server-builds-list.html" title="SQL Server Builds list" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/03/sql-server-builds-list.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4EQXY-eSp7ImA9WxZRGUw.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-217255296461389766</id><published>2008-02-13T10:34:00.001-03:00</published><updated>2008-02-13T10:55:00.851-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-02-13T10:55:00.851-03:00</app:edited><title>Montoring sql server agent jobs execution</title><content type="html">&lt;p&gt;To monitor sql server agent job execution not using the gui, you can do the following &lt;p&gt;&amp;nbsp; &lt;p&gt;SELECT program_name, login_time, host_name&lt;br&gt;FROM sys.dm_exec_sessions&lt;br&gt;WHERE status = 'running' &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;or use the following sp&lt;/p&gt; &lt;p&gt;&amp;nbsp; &lt;p&gt;EXEC msdb.[dbo].[sp_help_job]&lt;br&gt;@execution_status = 1&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-217255296461389766?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/217255296461389766/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=217255296461389766" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/217255296461389766?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/217255296461389766?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/k-iZYEo_XQQ/montoring-sql-server-agent-jobs.html" title="Montoring sql server agent jobs execution" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/02/montoring-sql-server-agent-jobs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04NRHk8fCp7ImA9WxZQEEo.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-8698458626303823557</id><published>2008-02-13T10:32:00.001-03:00</published><updated>2008-02-15T09:53:15.774-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-02-15T09:53:15.774-03:00</app:edited><title>Jobs</title><content type="html">&lt;p&gt;i am back on teaching classes business... that is a good thing.&lt;/p&gt; &lt;p&gt;one and most iimportant is that i got the obligation to study all the time to keep my classes ready to be taught and my mind always working.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;There is a plenty of microsoft official courses of sql server, many of them are short trainings, but very interesting ones. &lt;/p&gt; &lt;p&gt;Actually, i guess is an interesting strategy, because dividing the courses can make a more deep training about a subject.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-8698458626303823557?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/8698458626303823557/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=8698458626303823557" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/8698458626303823557?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/8698458626303823557?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/izA_MSBka5A/jobs.html" title="Jobs" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/02/jobs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0INRX47eyp7ImA9WxZSFkw.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-8814322930985797810</id><published>2008-01-29T09:59:00.001-03:00</published><updated>2008-01-29T09:59:54.003-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-29T09:59:54.003-03:00</app:edited><title>@@servername and SERVERPROPERTY('servername')</title><content type="html">&lt;p&gt;This two sql structures are suposed to return the same information, but in some cases they don´t. &lt;/p&gt; &lt;p&gt;There is something about where @@servername ans serverproperty(‘servername’) picks up the information. @@servername picks from sysservers, and (I don´t know why) this can be different from serverproperty, that returns the machinename plus the instance name. &lt;p&gt;SERVERPROPERTY(‘servername’) reports changes of network machine name, while @@servername don’t´, you shoul change it manually using&amp;nbsp; sp_dropserver and sp_addserver.  &lt;p&gt;There is some information on books online about that.   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-8814322930985797810?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/8814322930985797810/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=8814322930985797810" title="1 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/8814322930985797810?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/8814322930985797810?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/CDsEasWgtX8/servername-and-serverproperty.html" title="@@servername and SERVERPROPERTY(&amp;#39;servername&amp;#39;)" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/01/servername-and-serverproperty.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUNRn47fSp7ImA9WB9aGEQ.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-9045256615660662419</id><published>2008-01-09T14:04:00.001-03:00</published><updated>2008-01-09T14:04:57.005-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-09T14:04:57.005-03:00</app:edited><title>Cool SQL Locking detection queries</title><content type="html">&lt;p&gt;-- Detaction Queries Locking  &lt;p&gt;&amp;nbsp; &lt;p&gt;-- this one uses the dm_tran_locks, just converts some information of that &lt;p&gt;SELECT&lt;br&gt;&amp;nbsp;&amp;nbsp; L.resource_type,&lt;br&gt;&amp;nbsp;&amp;nbsp; DB_NAME(L.resource_database_id) as DatabaseName,&lt;br&gt;&amp;nbsp;&amp;nbsp; L.resource_associated_entity_id,&lt;br&gt;&amp;nbsp;&amp;nbsp; L.request_session_id,&lt;br&gt;&amp;nbsp;&amp;nbsp; L.request_mode,&lt;br&gt;&amp;nbsp;&amp;nbsp; L.request_status&lt;br&gt;FROM sys.dm_tran_locks AS L&lt;br&gt;WHERE L.request_status = 'WAIT'&lt;br&gt;ORDER BY DatabaseName, L.request_session_id;  &lt;p&gt;&amp;nbsp; &lt;p&gt;-- more descriptive &lt;p&gt;&amp;nbsp; &lt;p&gt;SELECT&lt;br&gt;&amp;nbsp;&amp;nbsp; w.session_id AS waiting_session_id,&lt;br&gt;&amp;nbsp;&amp;nbsp; DB_NAME(w.resource_database_id) AS DatabaseName,&lt;br&gt;&amp;nbsp;&amp;nbsp; w.wait_duration_ms,&lt;br&gt;&amp;nbsp;&amp;nbsp; w.waiting_task_address,&lt;br&gt;&amp;nbsp;&amp;nbsp; t.request_mode,&lt;br&gt;&amp;nbsp;&amp;nbsp; t.resource_type,&lt;br&gt;&amp;nbsp;&amp;nbsp; t.resource_associated_entity_id,&lt;br&gt;&amp;nbsp; w.resource_description AS lock_resource_description,&lt;br&gt;&amp;nbsp;&amp;nbsp; w.wait_type,&lt;br&gt;&amp;nbsp;&amp;nbsp; w.blocking_session_id,&lt;br&gt;&amp;nbsp;&amp;nbsp; w.resource_description AS blocking_resource_description&lt;br&gt;FROM sys.dm_os_waiting_tasks AS w&lt;br&gt;&amp;nbsp;&amp;nbsp; JOIN sys.dm_tran_locks AS t&lt;br&gt;&amp;nbsp;&amp;nbsp; ON w.resource_address = t.lock_owner_address&lt;br&gt;WHERE w.wait_duration_ms &amp;gt; 5000&lt;br&gt;&amp;nbsp;&amp;nbsp; AND w.session_id &amp;gt; 50;&lt;br&gt;&amp;nbsp;&amp;nbsp; &lt;/p&gt; &lt;p&gt;-- full descriptive with the locked query&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;SELECT&lt;br&gt;&amp;nbsp;&amp;nbsp; W.session_id AS waiting_session_id,&lt;br&gt;&amp;nbsp;&amp;nbsp; DB_NAME(T.resource_database_id) AS DatabaseName,&lt;br&gt;&amp;nbsp;&amp;nbsp; W.wait_duration_ms,&lt;br&gt;&amp;nbsp;&amp;nbsp; W.waiting_task_address,&lt;br&gt;&amp;nbsp;&amp;nbsp; t.request_mode,&lt;br&gt;&amp;nbsp;&amp;nbsp; (SELECT SUBSTRING(ST.text, (req.statement_start_offset/2) + 1,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((CASE req.statement_end_offset&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN -1 THEN DATALENGTH(ST.text)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE req.statement_end_offset&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END - req.statement_start_offset)/2) + 1)&lt;br&gt;&amp;nbsp;&amp;nbsp; FROM sys.dm_exec_requests AS req&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CROSS APPLY sys.dm_exec_sql_text(req.sql_handle) AS st&lt;br&gt;&amp;nbsp;&amp;nbsp; WHERE req.session_id = T.request_session_id)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS waiting_query_text,&lt;br&gt;&amp;nbsp;&amp;nbsp; t.resource_type,&lt;br&gt;&amp;nbsp;&amp;nbsp; t.resource_associated_entity_id,&lt;br&gt;&amp;nbsp;&amp;nbsp; w.wait_type,&lt;br&gt;&amp;nbsp;&amp;nbsp; w.blocking_session_id,&lt;br&gt;&amp;nbsp;&amp;nbsp; w.resource_description AS blocking_resource_description,&lt;br&gt;&amp;nbsp;&amp;nbsp; CASE WHEN W.blocking_session_id &amp;gt; 0 THEN&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (SELECT ST2.text FROM sys.sysprocesses AS Pr&lt;br&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; CROSS APPLY sys.dm_exec_sql_text(pr.sql_handle) AS ST2&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE pr.spid = w.blocking_session_id)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE NULL&lt;br&gt;&amp;nbsp;&amp;nbsp; END AS blocking_query_text&lt;br&gt;FROM sys.dm_os_waiting_tasks AS w&lt;br&gt;&amp;nbsp;&amp;nbsp; JOIN sys.dm_tran_locks AS t&lt;br&gt;&amp;nbsp;&amp;nbsp; ON w.resource_address = t.lock_owner_address&lt;br&gt;WHERE w.wait_duration_ms &amp;gt; 5000&lt;br&gt;&amp;nbsp;&amp;nbsp; AND w.session_id &amp;gt; 50;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Remember that only works on sql server 2005 or above.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-9045256615660662419?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/9045256615660662419/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=9045256615660662419" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/9045256615660662419?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/9045256615660662419?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/KUC3zDt2eac/cool-sql-locking-detection-queries.html" title="Cool SQL Locking detection queries" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/01/cool-sql-locking-detection-queries.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIAQn08eyp7ImA9WB9aGEU.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-8125019257858535433</id><published>2008-01-09T10:15:00.001-03:00</published><updated>2008-01-09T10:15:43.373-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-09T10:15:43.373-03:00</app:edited><title>lock escalation problems</title><content type="html">&lt;p&gt;I was reading something about lock escalation on kb. And one thing that called my attention is a simple way to break a large and complex query that deletes hundreds of records in a much smarter one... look at this&lt;/p&gt; &lt;p&gt;from &lt;a title="http://support.microsoft.com/kb/323630/en-us" href="http://support.microsoft.com/kb/323630/en-us"&gt;http://support.microsoft.com/kb/323630/en-us&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Break up large batch operations into several smaller operations. For example, suppose you ran the following query to remove several hundred thousand old records from an audit table, and then you found that it caused a lock escalation that blocked other users: &lt;code&gt;&lt;pre&gt;DELETE FROM LogMessages WHERE LogDate &amp;lt; '2/1/2002'						&lt;/pre&gt;&lt;/code&gt;By removing these records a few hundred at a time, you can dramatically reduce the number of locks that accumulate per transaction and prevent lock escalation. For example:&lt;code&gt;&lt;pre&gt;&lt;strong&gt;&lt;u&gt;SET ROWCOUNT 500&lt;br /&gt;delete_more:&lt;br /&gt;     DELETE FROM LogMessages WHERE LogDate &amp;lt; '2/1/2002'&lt;br /&gt;IF @@ROWCOUNT &amp;gt; 0 GOTO delete_more&lt;br /&gt;SET ROWCOUNT 0&lt;/u&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;end of microsoft kb&lt;/p&gt;&lt;pre&gt;&lt;strong&gt;ps. That's the shit! &lt;/strong&gt;&lt;/pre&gt;&lt;/code&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-8125019257858535433?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/8125019257858535433/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=8125019257858535433" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/8125019257858535433?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/8125019257858535433?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/Ne1qEweirIo/lock-escalation-problems.html" title="lock escalation problems" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/01/lock-escalation-problems.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQDRHc8cCp7ImA9WB9aGEU.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-3778424373867517504</id><published>2008-01-07T09:22:00.001-03:00</published><updated>2008-01-09T10:12:55.978-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-09T10:12:55.978-03:00</app:edited><title>SQL Server is SLOW</title><content type="html">&lt;p&gt;Holy... &lt;/p&gt; &lt;p&gt;When you got an incident like that there is a problem, the sql server do not respond, the client is in a hurry. &lt;/p&gt; &lt;p&gt;Unfortunaltly SQL Server 2000 is a black box for many events that could make a server to respond slowly due to wait events. &lt;/p&gt; &lt;p&gt;The situation classical for wait events is when server is slow, or not responding as desired, and you got free cpu, io, network bandwidth....&lt;/p&gt; &lt;p&gt;i found this article regarding this issues, may be useful sometime for someone, including myself :)&lt;/p&gt; &lt;p&gt;&lt;a title="http://www.simple-talk.com/sql/performance/sql-server-wait-events-taking-the-guesswork-out-of-performance-profiling/" href="http://www.simple-talk.com/sql/performance/sql-server-wait-events-taking-the-guesswork-out-of-performance-profiling/"&gt;http://www.simple-talk.com/sql/performance/sql-server-wait-events-taking-the-guesswork-out-of-performance-profiling/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Thanks to &lt;a href="http://www.simple-talk.com/author/mario-broodbakker/"&gt;Mario Broodbakker&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;ps. SQL Server 2005 has DMVs which helps a LOT, on doing performance troubleshooting. And SQL Server 2008 will (at least it should) be even better.&lt;/p&gt; &lt;p&gt;Enjoy!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-3778424373867517504?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/3778424373867517504/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=3778424373867517504" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/3778424373867517504?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/3778424373867517504?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/goCyN-QAGFM/sql-server-is-slow.html" title="SQL Server is SLOW" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/01/sql-server-is-slow.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08GQnczeip7ImA9WB9aFEg.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-5674013777973519973</id><published>2008-01-04T10:03:00.001-03:00</published><updated>2008-01-04T10:03:43.982-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-04T10:03:43.982-03:00</app:edited><title>Autoparameterization</title><content type="html">&lt;p&gt;This one is interesting on SQL Server, it allows a given execution plan to be reused among many similar ad-hoc queries. but is very important to sql server to watch if the parameter may have some influence on the number of rows.&amp;nbsp; The index selection is the same for all the parametrized queries, so if one query returns one row and another execution of the same query returns many rows it can be a problem. In this cases the parameterization is considered unsafe. &lt;/p&gt; &lt;p&gt;Here are some examples of unsafe (for parameterization) structures in SQL Server:&lt;/p&gt; &lt;ul&gt; &lt;li&gt; &lt;p&gt;JOIN&lt;/p&gt; &lt;li&gt; &lt;p&gt;BULK INSERT&lt;/p&gt; &lt;li&gt; &lt;p&gt;IN lists&lt;/p&gt; &lt;li&gt; &lt;p&gt;UNION&lt;/p&gt; &lt;li&gt; &lt;p&gt;INTO&lt;/p&gt; &lt;li&gt; &lt;p&gt;FOR BROWSE&lt;/p&gt; &lt;li&gt; &lt;p&gt;OPTION &amp;lt;query hints&amp;gt;&lt;/p&gt; &lt;li&gt; &lt;p&gt;DISTINCT&lt;/p&gt; &lt;li&gt; &lt;p&gt;TOP&lt;/p&gt; &lt;li&gt; &lt;p&gt;WAITFOR statements &lt;a name="581"&gt;&lt;/a&gt;&lt;a name="IDX-284"&gt;&lt;/a&gt;&lt;/p&gt; &lt;li&gt; &lt;p&gt;GROUP BY, HAVING, COMPUTE&lt;/p&gt; &lt;li&gt; &lt;p&gt;Full Text operators (Contains / Freetext)&lt;/p&gt; &lt;li&gt; &lt;p&gt;Subqueries&lt;/p&gt; &lt;li&gt; &lt;p&gt;FROM clause of a SELECT statement has table valued return or full-text table or OPENROWSET or OPENXML or OPENQUERY or OPENDATASOURCE --&amp;gt; Derived queries&lt;/p&gt; &lt;li&gt; &lt;p&gt;Comparison of the form EXPR &amp;lt;&amp;gt; a non-null constant&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;You can take a look of the parameterization operations in sql server by running this query &lt;p&gt;&amp;nbsp; &lt;p&gt;-- Excerpt from book Inside SQL Server: Query Tuning and Optimization &lt;p&gt;USE Northwind2&lt;br&gt;GO&lt;br&gt;DBCC FREEPROCCACHE;&lt;br&gt;GO&lt;br&gt;SELECT FirstName, LastName, Title FROM Employees WHERE EmployeeID = 6;&lt;br&gt;GO&lt;br&gt;SELECT FirstName, LastName, Title FROM Employees WHERE EmployeeID = 2;&lt;br&gt;GO&lt;br&gt;SELECT usecounts, cacheobjtype, objtype, [text]&lt;br&gt;FROM sys.dm_exec_cached_plans P&lt;br&gt;&amp;nbsp;&amp;nbsp; CROSS APPLY sys.dm_exec_sql_text (plan_handle)&lt;br&gt;WHERE cacheobjtype = 'Compiled Plan'&lt;br&gt;&amp;nbsp;&amp;nbsp; AND [text] NOT LIKE '%dm_exec_cached_plans%';&lt;br&gt;GO &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;The dm_exec_cached_plans can show some information about the stored plans and the form and parametrization information about them.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Still talking about safe and unsafe parameterization operations, there is a property on databases called&amp;nbsp; Parameterization. It can be set simple or forced. Forced means that sql server will take as parameters all the constants inside your query with few exceptions. the benefit is you compile less queries... so you save cpu time for other operations. &lt;/p&gt; &lt;p&gt;I may take for example a financial system that i was doing a tuning for sql server, in one hour the system sends to sql server thousands of small queries, setting parameterization forced save a lot of cpu time and memory.&lt;/p&gt; &lt;p&gt;The dark side of the force is that when you use parametrized plans, for queries that maybe have different cardinalities the plans might not be optimal, in such way that your perofrmance is affected.&lt;/p&gt; &lt;p&gt;Then? what is the right path? &lt;/p&gt; &lt;p&gt;Young padawan, the right way is always test, test with simple, and monitor with profiler, and check the plans... test with forced see the cpu use, and check the plans... always testing and choosing based on testing experience. It depends on a lot of factors, the server, workload, application architecture... and so on.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-5674013777973519973?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/5674013777973519973/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=5674013777973519973" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/5674013777973519973?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/5674013777973519973?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/bfglQHbhUOs/autoparameterization.html" title="Autoparameterization" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/01/autoparameterization.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MDQn0yfCp7ImA9WB9aE0U.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-5286470363167683037</id><published>2008-01-03T14:31:00.001-03:00</published><updated>2008-01-03T14:31:13.394-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-03T14:31:13.394-03:00</app:edited><title>More Hints to Take a look in Detail!</title><content type="html">&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Group Hints - like HASH GROUP, make some influence in group by operations (dahhh)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Union -- look for MERGE UNION&lt;/p&gt; &lt;p&gt;MAXDOP - nothing to do about dopping (ha ha ha), but have influence on paralelism for queries. IS VERY useful sometimes.. i remember when i was a consultant, when we got a problem that for no reason the thing just don't work,&amp;nbsp; always the PSS from microsoft say to put MAXDOP(0) in order to disable the paralelism. It was a long time ago in a Galaxy far far away...&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;EXPAND VIEWS:&amp;nbsp; is useful when you are running queries in conjunction with indexed views (resource only available on enterprise edition)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;INDEX - You can force indexes. but remember, if you force a plan an forget it on a application that plan might be good on a given situation but databases are dynamic, so your plan might be bad in another situation of your db, so be careful. in fact, the problem of forcning is inherent to any optimizer hint... &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-5286470363167683037?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/5286470363167683037/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=5286470363167683037" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/5286470363167683037?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/5286470363167683037?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/_pn4iMl1PZU/more-hints-to-take-look-in-detail.html" title="More Hints to Take a look in Detail!" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/01/more-hints-to-take-look-in-detail.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04AQX0_fSp7ImA9WB9aE0o.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-7392423150197342674</id><published>2008-01-03T14:05:00.001-03:00</published><updated>2008-01-03T14:05:40.345-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-03T14:05:40.345-03:00</app:edited><title>Force Order Hint</title><content type="html">&lt;p&gt;This one is cool.&lt;/p&gt; &lt;p&gt;SELECT O.[OrderId], O.[CustomerId] FROM [Customers] C JOIN &lt;b&gt;[Orders] O JOIN [Employees] E&lt;/b&gt; &lt;b&gt;ON O.[EmployeeId] = E.[EmployeeId]&lt;/b&gt; ON C.[CustomerId] = O.[CustomerId] WHERE C.[City] = N'London' AND E.[City] = N'London' OPTION (FORCE ORDER, HASH JOIN)&lt;/p&gt; &lt;p&gt;__________________________________________________&lt;/p&gt; &lt;p&gt;The force order hint, instructs sql server the order that the join should be resolved. On join resolution process, sql server analyzes the number of rows on each table and decides which one will be the inner table, and the outer table. With force order sql server will use the order in the query. It could be good in some cases, when the optimizer cannot detect the best plan, but could be bad, because you can mislead the optimizer best choice.&amp;nbsp; Besides the HASH JOIN hint forces the use o a given method, you can use LOOP, HASH or MERGE. &lt;p&gt;Again, the choice for a method to solve the join depends on cardinality factors that sql server analyzes using the statistics and available indexes.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Have Fun!&lt;/p&gt; &lt;p&gt;ps. If you want more details about that, read Inside SQL Server 2005:&amp;nbsp; Query Tuning and Optimization by Kalen Delaney&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-7392423150197342674?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/7392423150197342674/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=7392423150197342674" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/7392423150197342674?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/7392423150197342674?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/ZkuupZAAZek/force-order-hint.html" title="Force Order Hint" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/01/force-order-hint.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQCR30-fip7ImA9WB9aE0o.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-1899491430845827038</id><published>2008-01-03T13:22:00.001-03:00</published><updated>2008-01-03T13:22:46.356-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-03T13:22:46.356-03:00</app:edited><title>Fast optimizer hint clause</title><content type="html">&lt;p&gt;Look at this&lt;/p&gt; &lt;p&gt;SELECT&amp;nbsp; [OrderId], [CustomerId], [OrderDate]&lt;br&gt;FROM [Orders]&lt;br&gt;ORDER BY [OrderDate]  &lt;p&gt;-- Table 'Orders'. Scan count 1, logical reads 22, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.  &lt;p&gt;SELECT&amp;nbsp; [OrderId], [CustomerId], [OrderDate]&lt;br&gt;FROM [Orders]&lt;br&gt;ORDER BY [OrderDate]&lt;br&gt;OPTION (FAST 1) &lt;p&gt;--Table 'Orders'. Scan count 1, logical reads 1724, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. &lt;p&gt;__________________________________________________&lt;/p&gt; &lt;p&gt;The fast option says to the optimizer how many records the query should return. So, in this case, the plan is less efficient because the query returns all the rows on the table, and the plan is instructed to 'think' that it will return only one row. the fast hint, is interesting when we want to predict to the optimizer how many rows the query might return on its execution.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Another hint may be used to instruct the optimizer about the value of a parameter. Is the Optimized FOR hint. Look at the example:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;DECLARE @ShipCode nvarchar(20)&lt;br&gt;SET @ShipCode = N'05022'&lt;br&gt;SELECT [OrderId], [OrderDate]&lt;br&gt;FROM [Orders]&lt;br&gt;WHERE [ShipPostalCode] = @ShipCode  &lt;p&gt;-- Table 'Orders'. Scan count 1, logical reads 22, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.  &lt;p&gt;DECLARE @ShipCode nvarchar(20)&lt;br&gt;SET @ShipCode = N'05022'&lt;br&gt;SELECT [OrderId], [OrderDate]&lt;br&gt;FROM [Orders]&lt;br&gt;WHERE [ShipPostalCode] = @ShipCode&lt;br&gt;OPTION (OPTIMIZE FOR (@ShipCode = N'05022'))  &lt;p&gt;--Table 'Orders'. Scan count 1, logical reads 4, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.  &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;The optimize for option means that the execution plan should be optimized fro the @shipcode variable having the value '05022'. And results in a more efficient execution plan.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-1899491430845827038?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/1899491430845827038/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=1899491430845827038" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/1899491430845827038?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/1899491430845827038?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/hpRCEgzk_8Y/fast-optimizer-hint-clause.html" title="Fast optimizer hint clause" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/01/fast-optimizer-hint-clause.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4FRns5cCp7ImA9WB9aE0s.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-8743361710359320029</id><published>2008-01-03T10:45:00.001-03:00</published><updated>2008-01-03T10:45:17.528-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-03T10:45:17.528-03:00</app:edited><title>Improving Performance on SQL Server</title><content type="html">&lt;p&gt;When you will be trying to improve performance in queries remember this:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;1. Rewrite your query... think about using functions on columns can eliminate the use of indexes... subqueries, correlated and nocorrelated can limit the choices for the query optimizer, instead of it you may choose to put the results of subqueries on independent queries and variables... and use these variables later. &lt;/p&gt; &lt;p&gt;Besides, avoid cursors... sql server is good on dealing with groups of records... cursor is a mechanism to use on row at the time. no good.&lt;/p&gt; &lt;p&gt;2.&amp;nbsp; schema improvements. think about normalize and denormalize accordingly with the use of your application (OLAP or OLTP). Indexes, statistics, composite indexes, covering indexes .. bla bla bla..&lt;/p&gt; &lt;p&gt;all of this you may know.. but you don't know how many time i saw these obvious mistakes happens, so it may be important to remember.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;3. Statistics. The path to the optimizer to choose the right index is statistics... so choose the way you update if you do so automatically or manually, and the sample rate ... like full scan, is useful sometimes.. but keep in mind the overhead to do so.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;4. Indexes. Create indexes in low density columns. Keep in mind that sql server will not use your index if no query uses a selective predicate and sometimes it depends on the density the column, please... i've seen indexes created on a column Gender... gender is Male or Female... sql server will not use this index (in a 50% / 50% aprox. relation)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-8743361710359320029?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/8743361710359320029/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=8743361710359320029" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/8743361710359320029?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/8743361710359320029?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/2a4G_lMn4RM/improving-performance-on-sql-server.html" title="Improving Performance on SQL Server" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/01/improving-performance-on-sql-server.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUNQHY7fyp7ImA9WB9aE0s.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-8096927280483551357</id><published>2008-01-03T10:34:00.001-03:00</published><updated>2008-01-03T10:34:51.807-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-03T10:34:51.807-03:00</app:edited><title>Fowarding Pointer or Forwarding Record</title><content type="html">&lt;p&gt;Forwarding record is a way the sql server does to not have to move the record for another location when updates occurs and&amp;nbsp; it reorganizes the leaf level of a physical structure. It's like the signs say that you moved to another address...&lt;/p&gt; &lt;p&gt;But there is a pay for that... every time the scan is being made, the sql server, when it trips on a forwarding pointer it jumps to the real address and get back to continue the scan... so... it makes a simple scan much more complicated.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;here is a query to help you to check if you have a lot of these forwarding pointers&lt;/p&gt;&lt;pre&gt;SELECT forwarded_record_count&lt;br /&gt;FROM sys.dm_db_index_physical_stats&lt;br /&gt;   (db_id('Northwind2'), object_id('neworders'), null, null, 'detailed')&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-8096927280483551357?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/8096927280483551357/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=8096927280483551357" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/8096927280483551357?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/8096927280483551357?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/hxNian7zyRI/fowarding-pointer-or-forwarding-record.html" title="Fowarding Pointer or Forwarding Record" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/01/fowarding-pointer-or-forwarding-record.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MBQnw6eSp7ImA9WB9aEkQ.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-4762322398818413437</id><published>2008-01-02T15:44:00.001-03:00</published><updated>2008-01-02T15:44:13.211-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-02T15:44:13.211-03:00</app:edited><title>DBCC SHOWSTATISTICS</title><content type="html">&lt;p&gt;Holy!! i almost forgot this one.&lt;/p&gt; &lt;p&gt;let me explain.. i was reading th Inside SQL Server 2005: Query Tuning and Optimizing. and at certain point i tripped with DBCC SHOWSTATISTICS&lt;/p&gt; &lt;p&gt;try this &lt;/p&gt;&lt;pre&gt;DBCC SHOW_STATISTICS('Orders', 'cust_date_indx')&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Very Nice!!! the statistics is the catch to sql server do the right choice for indexes, after the index selection the statustics can help to discover if the index is suitable for a query.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;do some search job in the google and read a book... the statiscs is&amp;nbsp; a must on sql server!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Regards!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-4762322398818413437?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/4762322398818413437/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=4762322398818413437" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/4762322398818413437?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/4762322398818413437?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/UjS1Gqpkmok/dbcc-showstatistics.html" title="DBCC SHOWSTATISTICS" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/01/dbcc-showstatistics.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8MQHkyfyp7ImA9WB9aEk0.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-4067258271897942183</id><published>2008-01-01T14:34:00.001-03:00</published><updated>2008-01-01T14:34:41.797-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-01T14:34:41.797-03:00</app:edited><title>Change Tracking on SQL 2008</title><content type="html">&lt;p&gt;One feature that will be on SQL Server's next release is database change tracking. &lt;/p&gt; &lt;p&gt;it allows to create applications that track changes in databases without using mechanisms like replication or triggers and so on.&lt;/p&gt; &lt;p&gt;How it works?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;After a DML operation is made on database the following actions happen:&lt;/p&gt; &lt;li&gt;Performs the data insert, update, or delete operation. &lt;li&gt;Adds a row to an internal change tracking table. There is one internal table for each user table that uses change tracking.&lt;/li&gt; &lt;p&gt;so the change tracking is based on logging information in data tables to capture what is happening.&lt;/p&gt; &lt;p&gt;There is a bunch of functions to check the data that is been tracked *:&lt;/p&gt; &lt;p&gt;CHANGETABLE (CHANGES)  &lt;p&gt;Returns tracking information for all changes to a table that have occurred since a specified version. &lt;p&gt;CHANGETABLE (VERSION)  &lt;p&gt;Returns the latest change tracking information for a specified row. &lt;p&gt;CHANGE_TRACKING_MIN_VALID_VERSION()  &lt;p&gt;Returns the minimum version that is valid for use in obtaining change tracking information from the specified table when you are using the CHANGETABLE function. &lt;p&gt;CHANGE_TRACKING_CURRENT_VERSION  &lt;p&gt;Obtains a version that is associated with the last committed transaction. You can use this version the next time you enumerate changes by using CHANGETABLE. &lt;p&gt;CHANGE_TRACKING_IS_COLUMN_IN_MASK  &lt;p&gt;Interprets the SYS_CHANGE_COLUMNS value that is returned by the CHANGETABLE(CHANGES …) function. &lt;p&gt;WITH CHANGE_TRACKING_CONTEXT  &lt;p&gt;Enables the specification of a change context, such as an originator ID, when an application changes data. &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;* Excerpt from books online, pre-release material.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;there is new database options for the DBA control the change tracking feature (enabled or not) and&amp;nbsp; the period of retention for the information about the changes. &lt;/p&gt; &lt;p&gt;(check on database properties, change tracking tab)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-4067258271897942183?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/4067258271897942183/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=4067258271897942183" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/4067258271897942183?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/4067258271897942183?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/NEalWU5sWFY/change-tracking-on-sql-2008.html" title="Change Tracking on SQL 2008" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/01/change-tracking-on-sql-2008.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4GSHs6eSp7ImA9WB9aEk0.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-138220165879953238</id><published>2008-01-01T13:28:00.001-03:00</published><updated>2008-01-01T13:28:49.511-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-01T13:28:49.511-03:00</app:edited><title>Happy New Year!</title><content type="html">&lt;p&gt;Hello Everyone... last month i have to apologize. The blog was as little bit without updates... the holidays and all the related stuff.. but this year we got a lot of stuff to have fun. &lt;/p&gt; &lt;p&gt;The sql server 2008 will be lauched soon and we have a lot of things to check out.&lt;/p&gt; &lt;p&gt;to start i sugest you take a look at pauls randall's blog (&lt;a title="http://www.sqlskills.com/blogs/paul/2007/12/31/InsideTheStorageEngineWhenDoVersioningTagsGetAdded.aspx" href="http://www.sqlskills.com/blogs/paul/2007/12/31/InsideTheStorageEngineWhenDoVersioningTagsGetAdded.aspx"&gt;http://www.sqlskills.com/blogs/paul/2007/12/31/InsideTheStorageEngineWhenDoVersioningTagsGetAdded.aspx&lt;/a&gt;) this article in the hyperlink discusses the myth about and overhead on using snapshot isolation level. When you are in a snapshot transaction and you got multiple versions of rows some of these versions are marked as ghost records, and you can identify that via dbcc page.&lt;/p&gt; &lt;p&gt;Enjoy! and Happy 2008 for everyone!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-138220165879953238?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/138220165879953238/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=138220165879953238" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/138220165879953238?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/138220165879953238?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/6iSswihjRCc/happy-new-year.html" title="Happy New Year!" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2008/01/happy-new-year.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8BSXc4fip7ImA9WB9UFEs.&quot;"><id>tag:blogger.com,1999:blog-6619382698657455437.post-6669304707540061347</id><published>2007-12-12T10:57:00.001-03:00</published><updated>2007-12-12T10:57:38.936-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-12-12T10:57:38.936-03:00</app:edited><title>Finnally i'm settle down!</title><content type="html">&lt;p&gt;Finnally i'm settle down with my new routine on the new job. I got a minute or two&amp;nbsp; to write on the blog.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;SQL Server 2008 is very close to be released. But do not expect major changes on this release. I've installed the november ctp and one of the thing that brought to my attention was the new installer, fully intergrtated with all the tools included.&lt;/p&gt; &lt;p&gt;in the past two weeks i was striving to configure a cluster with Virtual Server. I got a lot work trying to accomplish that... and the problems were minor ones.. like windows update.. dns ... domain.. and stuff like that. &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;be smart with sql server 2008 release.. one of the most interesting features is the Transparent data encryption. It allows you to create a database that only can be attached on a server that has a proper encryption key. This way, if by accident, the data is stolen somehow, you can asure that this information is useless because is fully encrypted, and without a proper key, cannot be used.&lt;/p&gt; &lt;p&gt;There is an interesting article on database journal about that improvements on sql server 2008. Unfornatly there is a little or no techincal details about how to do it. I did some tests with data encryption, i will put it here later... just let me take som time to find it on my computer... &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;That's all folks&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6619382698657455437-6669304707540061347?l=sqlwanden.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqlwanden.blogspot.com/feeds/6669304707540061347/comments/default" title="Postar comentários" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6619382698657455437&amp;postID=6669304707540061347" title="0 Comentários" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/6669304707540061347?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6619382698657455437/posts/default/6669304707540061347?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/sqlwanden/~3/f2itlBr9JOg/finnally-i-settle-down.html" title="Finnally i&amp;#39;m settle down!" /><author><name>Wanden</name><uri>http://www.blogger.com/profile/15937226616125912076</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="17517164172821209747" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://sqlwanden.blogspot.com/2007/12/finnally-i-settle-down.html</feedburner:origLink></entry></feed>
