<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for SQL RNNR</title>
	<atom:link href="http://jasonbrimhall.info/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://jasonbrimhall.info</link>
	<description>1 DBA&#039;s Professional Blog</description>
	<lastBuildDate>Wed, 15 Feb 2012 18:42:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>Comment on Missing Indexes by David</title>
		<link>http://jasonbrimhall.info/2012/01/12/missing-indexes/comment-page-1/#comment-23344</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 15 Feb 2012 18:42:31 +0000</pubDate>
		<guid isPermaLink="false">http://jasonbrimhall.info/?p=1563#comment-23344</guid>
		<description>Has anyone figured out how to get this to work in a database at compatability level 80 on a 2005/2008 SQL server?</description>
		<content:encoded><![CDATA[<p>Has anyone figured out how to get this to work in a database at compatability level 80 on a 2005/2008 SQL server?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on S3OLV February 2012 by jonmcrawford</title>
		<link>http://jasonbrimhall.info/2012/01/23/s3olv-february-2012/comment-page-1/#comment-23342</link>
		<dc:creator>jonmcrawford</dc:creator>
		<pubDate>Wed, 15 Feb 2012 18:07:08 +0000</pubDate>
		<guid isPermaLink="false">http://jasonbrimhall.info/?p=1591#comment-23342</guid>
		<description>You know you could just call Pizza Hut and have them deliver a pizza to my door...that&#039;d be swell of you...</description>
		<content:encoded><![CDATA[<p>You know you could just call Pizza Hut and have them deliver a pizza to my door&#8230;that&#8217;d be swell of you&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Missing Indexes by Jason Brimhall</title>
		<link>http://jasonbrimhall.info/2012/01/12/missing-indexes/comment-page-1/#comment-23338</link>
		<dc:creator>Jason Brimhall</dc:creator>
		<pubDate>Wed, 15 Feb 2012 16:15:17 +0000</pubDate>
		<guid isPermaLink="false">http://jasonbrimhall.info/?p=1563#comment-23338</guid>
		<description>@Neil - thanks for the additional script.  Be careful of sp_msForeachdb.  It has limitations and will throw some errors depending on the script being employed.  The looping mechanism in it is a little less refined than other methods.

Here is an article on that.
http://sqlblog.com/blogs/aaron_bertrand/archive/2010/12/29/a-more-reliable-and-more-flexible-sp-msforeachdb.aspx</description>
		<content:encoded><![CDATA[<p>@Neil &#8211; thanks for the additional script.  Be careful of sp_msForeachdb.  It has limitations and will throw some errors depending on the script being employed.  The looping mechanism in it is a little less refined than other methods.</p>
<p>Here is an article on that.<br />
<a href="http://sqlblog.com/blogs/aaron_bertrand/archive/2010/12/29/a-more-reliable-and-more-flexible-sp-msforeachdb.aspx" rel="nofollow">http://sqlblog.com/blogs/aaron_bertrand/archive/2010/12/29/a-more-reliable-and-more-flexible-sp-msforeachdb.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Missing Indexes by Neil</title>
		<link>http://jasonbrimhall.info/2012/01/12/missing-indexes/comment-page-1/#comment-23330</link>
		<dc:creator>Neil</dc:creator>
		<pubDate>Wed, 15 Feb 2012 11:58:53 +0000</pubDate>
		<guid isPermaLink="false">http://jasonbrimhall.info/?p=1563#comment-23330</guid>
		<description>I have worked an alternative without a cursor.


DECLARE @STATEMENT NVARCHAR(MAX)
 
SET @STATEMENT = N&#039;USE [?]&#039;+ CHAR(13) +&#039;;&#039; +CHAR(13)
+ N&#039;
SELECT SO.name
		, ((CONVERT(Numeric(19,6), migs.user_seeks)+CONVERT(Numeric(19,6), migs.unique_compiles))
			*CONVERT(Numeric(19,6), migs.avg_total_user_cost)
			*CONVERT(Numeric(19,6), migs.avg_user_impact/100.0)) AS Impact
		,&#039;&#039;DO NOT AUTO CREATE THESE INDEXES - Creating these indexes could be as bad as blindly using DTA&#039;&#039; as Note
		, &#039;&#039;CREATE NONCLUSTERED INDEX IDX_&#039;&#039; + SO.name +&#039;&#039;_&#039;&#039; + STUFF (
		(SELECT &#039;&#039;_&#039;&#039; + column_name FROM sys.dm_db_missing_index_columns(mid.index_handle) WHERE column_usage IN (&#039;&#039;Equality&#039;&#039;,&#039;&#039;InEquality&#039;&#039;) FOR XML PATH (&#039;&#039;&#039;&#039;))
		, 1, 1, &#039;&#039;&#039;&#039;)  + &#039;&#039; ON [?].&#039;&#039; + schema_name(SO.schema_id) + &#039;&#039;.&#039;&#039; + SO.name COLLATE DATABASE_DEFAULT + &#039;&#039; ( &#039;&#039; + IsNull(mid.equality_columns, &#039;&#039;&#039;&#039;) + CASE WHEN mid.inequality_columns IS NULL
		THEN &#039;&#039;&#039;&#039;
		ELSE CASE WHEN mid.equality_columns IS NULL
		THEN &#039;&#039;&#039;&#039;
		ELSE &#039;&#039;,&#039;&#039; END + mid.inequality_columns END + &#039;&#039; ) &#039;&#039; + CASE WHEN mid.included_columns IS NULL
		THEN &#039;&#039;&#039;&#039;
		ELSE &#039;&#039;INCLUDE (&#039;&#039; + mid.included_columns + &#039;&#039;)&#039;&#039; END + &#039;&#039;;&#039;&#039; AS CreateIndexStatement
		, mid.equality_columns
		, mid.inequality_columns
		, mid.included_columns
	FROM sys.dm_db_missing_index_group_stats AS migs
		INNER JOIN sys.dm_db_missing_index_groups AS mig
			ON migs.group_handle = mig.index_group_handle
		INNER JOIN sys.dm_db_missing_index_details AS mid
			ON mig.index_handle = mid.index_handle
			AND mid.database_id = DB_ID()
		INNER JOIN sys.objects SO WITH (nolock)
			ON mid.OBJECT_ID = SO.OBJECT_ID
	WHERE (migs.group_handle IN
			(
			SELECT TOP (500) group_handle
			FROM sys.dm_db_missing_index_group_stats WITH (nolock)
			ORDER BY ((CONVERT(Numeric(19,6), migs.user_seeks)+CONVERT(Numeric(19,6), migs.unique_compiles))
				*CONVERT(Numeric(19,6), migs.avg_total_user_cost)
				*CONVERT(Numeric(19,6), migs.avg_user_impact/100.0)) DESC))
		AND OBJECTPROPERTY(SO.OBJECT_ID, &#039;&#039;isusertable&#039;&#039;)=1
	ORDER BY 2 DESC , 3 DESC&#039; 

EXEC sp_MSforeachdb @STATEMENT</description>
		<content:encoded><![CDATA[<p>I have worked an alternative without a cursor.</p>
<p>DECLARE @STATEMENT NVARCHAR(MAX)</p>
<p>SET @STATEMENT = N&#8217;USE [?]&#8216;+ CHAR(13) +&#8217;;&#8217; +CHAR(13)<br />
+ N&#8217;<br />
SELECT SO.name<br />
		, ((CONVERT(Numeric(19,6), migs.user_seeks)+CONVERT(Numeric(19,6), migs.unique_compiles))<br />
			*CONVERT(Numeric(19,6), migs.avg_total_user_cost)<br />
			*CONVERT(Numeric(19,6), migs.avg_user_impact/100.0)) AS Impact<br />
		,&#8221;DO NOT AUTO CREATE THESE INDEXES &#8211; Creating these indexes could be as bad as blindly using DTA&#8221; as Note<br />
		, &#8221;CREATE NONCLUSTERED INDEX IDX_&#8221; + SO.name +&#8221;_&#8221; + STUFF (<br />
		(SELECT &#8221;_&#8221; + column_name FROM sys.dm_db_missing_index_columns(mid.index_handle) WHERE column_usage IN (&#8221;Equality&#8221;,&#8221;InEquality&#8221;) FOR XML PATH (&#8221;&#8221;))<br />
		, 1, 1, &#8221;&#8221;)  + &#8221; ON [?].&#8221; + schema_name(SO.schema_id) + &#8221;.&#8221; + SO.name COLLATE DATABASE_DEFAULT + &#8221; ( &#8221; + IsNull(mid.equality_columns, &#8221;&#8221;) + CASE WHEN mid.inequality_columns IS NULL<br />
		THEN &#8221;&#8221;<br />
		ELSE CASE WHEN mid.equality_columns IS NULL<br />
		THEN &#8221;&#8221;<br />
		ELSE &#8221;,&#8221; END + mid.inequality_columns END + &#8221; ) &#8221; + CASE WHEN mid.included_columns IS NULL<br />
		THEN &#8221;&#8221;<br />
		ELSE &#8221;INCLUDE (&#8221; + mid.included_columns + &#8221;)&#8221; END + &#8221;;&#8221; AS CreateIndexStatement<br />
		, mid.equality_columns<br />
		, mid.inequality_columns<br />
		, mid.included_columns<br />
	FROM sys.dm_db_missing_index_group_stats AS migs<br />
		INNER JOIN sys.dm_db_missing_index_groups AS mig<br />
			ON migs.group_handle = mig.index_group_handle<br />
		INNER JOIN sys.dm_db_missing_index_details AS mid<br />
			ON mig.index_handle = mid.index_handle<br />
			AND mid.database_id = DB_ID()<br />
		INNER JOIN sys.objects SO WITH (nolock)<br />
			ON mid.OBJECT_ID = SO.OBJECT_ID<br />
	WHERE (migs.group_handle IN<br />
			(<br />
			SELECT TOP (500) group_handle<br />
			FROM sys.dm_db_missing_index_group_stats WITH (nolock)<br />
			ORDER BY ((CONVERT(Numeric(19,6), migs.user_seeks)+CONVERT(Numeric(19,6), migs.unique_compiles))<br />
				*CONVERT(Numeric(19,6), migs.avg_total_user_cost)<br />
				*CONVERT(Numeric(19,6), migs.avg_user_impact/100.0)) DESC))<br />
		AND OBJECTPROPERTY(SO.OBJECT_ID, &#8221;isusertable&#8221;)=1<br />
	ORDER BY 2 DESC , 3 DESC&#8217; </p>
<p>EXEC sp_MSforeachdb @STATEMENT</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on T-SQL Tuesday #009: Beach Time by T-SQL Tuesday Topics &#8211; Febuary 2012 &#171; Voice of the DBA</title>
		<link>http://jasonbrimhall.info/2010/08/03/t-sql-tuesday-009-beach-time/comment-page-1/#comment-22967</link>
		<dc:creator>T-SQL Tuesday Topics &#8211; Febuary 2012 &#171; Voice of the DBA</dc:creator>
		<pubDate>Tue, 07 Feb 2012 16:43:09 +0000</pubDate>
		<guid isPermaLink="false">http://jasonbrimhall.info/?p=678#comment-22967</guid>
		<description>[...] T-SQL Tuesday #009: Beach Time [...]</description>
		<content:encoded><![CDATA[<p>[...] T-SQL Tuesday #009: Beach Time [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Slammer, Alive&#8230;Barely by Jason Brimhall</title>
		<link>http://jasonbrimhall.info/2012/01/24/slammer-alive-barely/comment-page-1/#comment-22309</link>
		<dc:creator>Jason Brimhall</dc:creator>
		<pubDate>Wed, 25 Jan 2012 00:52:13 +0000</pubDate>
		<guid isPermaLink="false">http://jasonbrimhall.info/?p=1596#comment-22309</guid>
		<description>As a follow-up to this, I have monitored my logs throughout the day and continue to see various different hosts using the Slammer signature trying to invade my machine.</description>
		<content:encoded><![CDATA[<p>As a follow-up to this, I have monitored my logs throughout the day and continue to see various different hosts using the Slammer signature trying to invade my machine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Missing Indexes by Jason Brimhall</title>
		<link>http://jasonbrimhall.info/2012/01/12/missing-indexes/comment-page-1/#comment-22183</link>
		<dc:creator>Jason Brimhall</dc:creator>
		<pubDate>Fri, 20 Jan 2012 19:26:55 +0000</pubDate>
		<guid isPermaLink="false">http://jasonbrimhall.info/?p=1563#comment-22183</guid>
		<description>Yes - that would definitely be an issue.  Thanks for getting back on it.</description>
		<content:encoded><![CDATA[<p>Yes &#8211; that would definitely be an issue.  Thanks for getting back on it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Missing Indexes by david</title>
		<link>http://jasonbrimhall.info/2012/01/12/missing-indexes/comment-page-1/#comment-22181</link>
		<dc:creator>david</dc:creator>
		<pubDate>Fri, 20 Jan 2012 19:15:39 +0000</pubDate>
		<guid isPermaLink="false">http://jasonbrimhall.info/?p=1563#comment-22181</guid>
		<description>I found that the problem was related to the database being in compatibility mode 80. It works fine for compatibility mode 100.</description>
		<content:encoded><![CDATA[<p>I found that the problem was related to the database being in compatibility mode 80. It works fine for compatibility mode 100.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TSQL Tuesday #26 or #23 &#8211; Identity Crisis by T-SQL Tuesday #026 &#8211; The Wrap Up &#124; Dave&#039;s SQL Blog</title>
		<link>http://jasonbrimhall.info/2012/01/10/tsql-tuesday-26-or-23-identity-crisis/comment-page-1/#comment-22071</link>
		<dc:creator>T-SQL Tuesday #026 &#8211; The Wrap Up &#124; Dave&#039;s SQL Blog</dc:creator>
		<pubDate>Wed, 18 Jan 2012 15:07:49 +0000</pubDate>
		<guid isPermaLink="false">http://jasonbrimhall.info/?p=1551#comment-22071</guid>
		<description>[...] cool New Year&#8217;s Eve images, Jason Brimhall (blog &#124; @sqlrnnr) covers several type of ways to perform JOINs on tables where a bitmask is applied to an id field. Original T-SQL Tuesday [...]</description>
		<content:encoded><![CDATA[<p>[...] cool New Year&#8217;s Eve images, Jason Brimhall (blog | @sqlrnnr) covers several type of ways to perform JOINs on tables where a bitmask is applied to an id field. Original T-SQL Tuesday [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Missing Indexes by Jason Brimhall</title>
		<link>http://jasonbrimhall.info/2012/01/12/missing-indexes/comment-page-1/#comment-22029</link>
		<dc:creator>Jason Brimhall</dc:creator>
		<pubDate>Tue, 17 Jan 2012 19:40:31 +0000</pubDate>
		<guid isPermaLink="false">http://jasonbrimhall.info/?p=1563#comment-22029</guid>
		<description>I created the script on 2008 R2.  Are you using the script as is, or did you modify?  I added brackets around object names when I saw that in testing and it resolved it for me.  This might be something different, so I ask.</description>
		<content:encoded><![CDATA[<p>I created the script on 2008 R2.  Are you using the script as is, or did you modify?  I added brackets around object names when I saw that in testing and it resolved it for me.  This might be something different, so I ask.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

