<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>A Data Professional&#039;s Blog</title>
	<atom:link href="http://dataprofessional.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dataprofessional.wordpress.com</link>
	<description>Just trying to evolve...</description>
	<lastBuildDate>Wed, 27 Jan 2010 10:00:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='dataprofessional.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/d6b9943cd0c24ce476ba58298210fddc?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>A Data Professional&#039;s Blog</title>
		<link>http://dataprofessional.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dataprofessional.wordpress.com/osd.xml" title="A Data Professional&#039;s Blog" />
	<atom:link rel='hub' href='http://dataprofessional.wordpress.com/?pushpress=hub'/>
		<item>
		<title>SQL: Removing a specific plan from the procedure cache</title>
		<link>http://dataprofessional.wordpress.com/2010/01/27/sql-removing-a-specific-plan-from-the-procedure-cache/</link>
		<comments>http://dataprofessional.wordpress.com/2010/01/27/sql-removing-a-specific-plan-from-the-procedure-cache/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 10:00:27 +0000</pubDate>
		<dc:creator>dataprofessional</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://dataprofessional.wordpress.com/2010/01/27/sql-removing-a-specific-plan-from-the-procedure-cache/</guid>
		<description><![CDATA[Source: http://glennberrysqlperformance.spaces.live.com/Blog/cns!45041418ECCAA960!2952.entry &#160; Nearly anytime you see the command DBCC FREEPROCCACHE mentioned in a blog post, magazine article or book, you get some sort of a scary warning about how you should not use it on a production system, or else life as we know it will end. For example, Books Online says this: Use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=47&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Source: <a href="http://glennberrysqlperformance.spaces.live.com/Blog/cns!45041418ECCAA960!2952.entry">http://glennberrysqlperformance.spaces.live.com/Blog/cns!45041418ECCAA960!2952.entry</a></p>
<p>&#160;</p>
<p>Nearly anytime you see the command DBCC FREEPROCCACHE mentioned in a blog post, magazine article or book, you get some sort of a scary warning about how you should not use it on a production system, or else life as we know it will end. For example, Books Online says this:</p>
<blockquote><p>Use DBCC FREEPROCCACHE to clear the plan cache carefully. Freeing the plan cache causes, for example, a stored procedure to be recompiled instead of reused from the cache. This can cause a sudden, temporary decrease in query performance. For each cleared cachestore in the plan cache, the SQL Server error log will contain the following informational message: &quot;SQL Server has encountered %d occurrence(s) of cachestore flush for the &#8216;%s&#8217; cachestore (part of plan cache) due to &#8216;DBCC FREEPROCCACHE&#8217; or &#8216;DBCC FREESYSTEMCACHE&#8217; operations.&quot; This message is logged every five minutes as long as the cache is flushed within that time interval.</p>
</blockquote>
<p>I would argue that running DBCC FREEPROCCACHE does not cause that much distress, even on a very busy OLTP system. It will cause a pretty minor CPU spike for a few seconds on most systems as the plans get recompiled. It can actually be pretty useful for resetting the cached_time time for sys.dm_exec_procedure_stats so that it is the same for most of the stored procedures in your normal workload. That makes it easier to pick out your most expensive queries or stored procedures on a cumulative basis when you are looking at things like total worker time or total logical reads.</p>
<p>Having said all that, I want to show a few methods for clearing all or part of the procedure cache that are somewhat less impactful on the system. Running DBCC FREEPROCCACHE is kind of a brute force approach, so if you are concerned about that, you can run one of the variations shown below:</p>
<pre>-- Example 1 (Sledgehammer)
-- Remove all elements from the plan cache for the entire instance
DBCC FREEPROCCACHE;

-- Flush the cache and suppress the regular completion message
-- &quot;DBCC execution completed. If DBCC printed error messages, contact your system administrator.&quot;
DBCC FREEPROCCACHE WITH NO_INFOMSGS;

-- Example 2 (Ballpeen hammer)
-- Remove all elements from the plan cache for one database
-- Get DBID from one database name first
DECLARE @intDBID INT;
SET @intDBID = (SELECT [dbid]
                FROM master.dbo.sysdatabases
                WHERE name = 'AdventureWorks');

-- Flush the procedure cache for one database only
DBCC FLUSHPROCINDB (@intDBID);

-- Example 3 (Scalpel)
-- Remove one plan from the cache
-- Get the plan handle for a cached plan
SELECT cp.plan_handle, st.[text]
FROM sys.dm_exec_cached_plans AS cp
CROSS APPLY sys.dm_exec_sql_text(plan_handle) AS st
WHERE [text] LIKE N'%/* GetOnlineSearchResultsMonday %';

-- Remove the specific plan from the cache using the plan handle
DBCC FREEPROCCACHE (0x05000800F7BA926C40C15055070000000000000000000000);</pre>
<p><b>Note:</b> Cross posted from <a href="http://blogs.infosupport.com/blogs/robp/default.aspx">Rob Pellicaan IS Blog</a>.<br />
<br /><a href="/blogs/robp/archive/2010/01/27/sql-removing-a-specific-plan-from-the-procedure-cache.aspx">Permalink</a><br /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dataprofessional.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dataprofessional.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dataprofessional.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dataprofessional.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dataprofessional.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dataprofessional.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dataprofessional.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dataprofessional.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dataprofessional.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dataprofessional.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dataprofessional.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dataprofessional.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dataprofessional.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dataprofessional.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=47&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dataprofessional.wordpress.com/2010/01/27/sql-removing-a-specific-plan-from-the-procedure-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b7dc3391ad28ac4e0af9083a44d4cf71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dataprofessional</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Server developers factsheet</title>
		<link>http://dataprofessional.wordpress.com/2010/01/26/sql-server-developers-factsheet/</link>
		<comments>http://dataprofessional.wordpress.com/2010/01/26/sql-server-developers-factsheet/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 13:36:14 +0000</pubDate>
		<dc:creator>dataprofessional</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://dataprofessional.wordpress.com/2010/01/26/sql-server-developers-factsheet/</guid>
		<description><![CDATA[A colleague pointed me to a nice cheat sheet for SQL Server developers. It contains: - A checklist for writing fast queries - Sargability of queries - A checklist for creating indexes - A legend of the &#8216;Execution Plan Icons&#8217;, including some optimizing tips and tricks. - All datatypes, including memory-usage and indication for best [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=46&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A colleague pointed me to a nice cheat sheet for SQL Server developers. It contains:</p>
<p>- A checklist for writing fast queries    <br />- Sargability of queries     <br />- A checklist for creating indexes    <br />- A legend of the &#8216;Execution Plan Icons&#8217;, including some optimizing tips and tricks.    <br />- All datatypes, including memory-usage and indication for best performing types    <br />- All string functions    <br />- All system functions    <br />- All date and time functions    <br />- A list of all dateparts    <br />- The cursor functions    <br />- The mathematical functions</p>
<p>Source: <a href="http://www.dotnet4all.com/snippets/2008/04/factsheet-for-sql-server-developers.html">http://www.dotnet4all.com/snippets/2008/04/factsheet-for-sql-server-developers.html</a></p>
<p>Direct link: <a title="http://www.dotnet4all.com/snippets/factsheet%20SQL%20Server.pdf" href="http://www.dotnet4all.com/snippets/factsheet%20SQL%20Server.pdf">http://www.dotnet4all.com/snippets/factsheet%20SQL%20Server.pdf</a></p>
<p><b>Note:</b> Cross posted from <a href="http://blogs.infosupport.com/blogs/robp/default.aspx">Rob Pellicaan IS Blog</a>.<br />
<br /><a href="/blogs/robp/archive/2010/01/26/sql-server-developers-factsheet.aspx">Permalink</a><br /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dataprofessional.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dataprofessional.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dataprofessional.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dataprofessional.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dataprofessional.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dataprofessional.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dataprofessional.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dataprofessional.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dataprofessional.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dataprofessional.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dataprofessional.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dataprofessional.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dataprofessional.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dataprofessional.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=46&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dataprofessional.wordpress.com/2010/01/26/sql-server-developers-factsheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b7dc3391ad28ac4e0af9083a44d4cf71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dataprofessional</media:title>
		</media:content>
	</item>
		<item>
		<title>Installation of SharePoint 2010 with PowerPivot on a single server.</title>
		<link>http://dataprofessional.wordpress.com/2009/11/25/installation-of-sharepoint-2010-with-powerpivot-on-a-single-server/</link>
		<comments>http://dataprofessional.wordpress.com/2009/11/25/installation-of-sharepoint-2010-with-powerpivot-on-a-single-server/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 23:05:53 +0000</pubDate>
		<dc:creator>dataprofessional</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://dataprofessional.wordpress.com/2009/11/25/installation-of-sharepoint-2010-with-powerpivot-on-a-single-server/</guid>
		<description><![CDATA[I took me a couple of hours of research, waiting and clicking, but I have successfully been able to install the public beta of Sharepoint 2010 with the SQL Server 2008 R2 November CTP with PowerPivot for Sharepoint Server 2010 on a single VM. This is the proof: While I have been recording my installations [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=45&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I took me a couple of hours of research, waiting and clicking, but I have successfully been able to install the public beta of Sharepoint 2010 with the SQL Server 2008 R2 November CTP with PowerPivot for Sharepoint Server 2010 on a single VM.</p>
<p>This is the proof:</p>
<p><a href="http://blogs.infosupport.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/robp/image_5F00_5E36AA64.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://blogs.infosupport.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/robp/image_5F00_thumb_5F00_46031A3C.png" width="244" height="184" /></a> </p>
<p>While I have been recording my installations steps, I will not put them here, as I came across another post that describes the required steps in even more detail, including the solution to my <a title="http://powerpivotgeek.com/2009/11/17/installing-powerpivot-for-sharepoint-on-a-domain-controller/" href="http://powerpivotgeek.com/2009/11/17/installing-powerpivot-for-sharepoint-on-a-domain-controller/">broken setup</a>.</p>
<p>A big thanks to Vidalis for posting the required installation steps:</p>
<p><a href="http://powerpivot-info.com/post/66-step-by-step-guide-on-installing-powerpivot-for-sharepoint">http://powerpivot-info.com/post/66-step-by-step-guide-on-installing-powerpivot-for-sharepoint</a></p>
<p>&#160;</p>
<p>Everything is public Beta material, so you can give it a go yourself!</p>
<p>I downloaded and installed <a href="http://www.virtualbox.org/wiki/Downloads">Sun VirtualBox</a> : I use this to host the 64-bit guest on my Windows 7 laptop. Alternatives are Windows Server 2008 with Hyper-V or VMware.</p>
<p><b>Note:</b> Cross posted from <a href="http://blogs.infosupport.com/blogs/robp/default.aspx">Rob Pellicaan IS Blog</a>.<br />
<br /><a href="/blogs/robp/archive/2009/11/25/installation-of-sharepoint-2010-with-powerpivot-on-a-single-server.aspx">Permalink</a><br /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dataprofessional.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dataprofessional.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dataprofessional.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dataprofessional.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dataprofessional.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dataprofessional.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dataprofessional.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dataprofessional.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dataprofessional.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dataprofessional.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dataprofessional.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dataprofessional.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dataprofessional.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dataprofessional.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=45&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dataprofessional.wordpress.com/2009/11/25/installation-of-sharepoint-2010-with-powerpivot-on-a-single-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b7dc3391ad28ac4e0af9083a44d4cf71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dataprofessional</media:title>
		</media:content>

		<media:content url="http://blogs.infosupport.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/robp/image_5F00_thumb_5F00_46031A3C.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Server MVP Deep Dives &#8211; Something for your Christmas wish list ?</title>
		<link>http://dataprofessional.wordpress.com/2009/11/24/sql-server-mvp-deep-dives-something-for-your-christmas-wish-list/</link>
		<comments>http://dataprofessional.wordpress.com/2009/11/24/sql-server-mvp-deep-dives-something-for-your-christmas-wish-list/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 15:26:45 +0000</pubDate>
		<dc:creator>dataprofessional</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://dataprofessional.wordpress.com/2009/11/24/sql-server-mvp-deep-dives-something-for-your-christmas-wish-list/</guid>
		<description><![CDATA[I just purchased this book to have something to read during my 44 hours in airplanes for a 4 week Christmas holiday in New Zealand. The book –written for charity &#8211; contains content from 53 MVPs with Paul Nielsen, Kalen Delaney, Greg Low, Adam Machanic, Paul S. Randal and Kimberly L. Tripp as editors. When [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=43&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just purchased this book to have something to read during my 44 hours in airplanes for a 4 week Christmas holiday in New Zealand. </p>
<p>The book –written for charity &#8211; contains content from 53 MVPs with <a href="http://sqlblog.com/blogs/paul_nielsen/default.aspx">Paul Nielsen</a>, <a href="http://sqlblog.com/blogs/kalen_delaney/default.aspx">Kalen Delaney</a>, <a href="http://sqlblog.com/blogs/greg_low/default.aspx">Greg Low</a>, <a href="http://sqlblog.com/blogs/adam_machanic/">Adam Machanic</a>, <a href="http://www.SQLskills.com/blogs/Paul">Paul S. Randal</a> and Kimberly L. Tripp as editors. When purchased through Manning a larger amount of the proceeds go to WarChild.</p>
<p>More info: <a href="http://www.sqlskills.com/BLOGS/KIMBERLY/post/SQL-Server-MVP-Deep-Dives-(book-for-charity).aspx">http://www.sqlskills.com/BLOGS/KIMBERLY/post/SQL-Server-MVP-Deep-Dives-(book-for-charity).aspx</a>.</p>
<p><b>Note:</b> Cross posted from <a href="http://blogs.infosupport.com/blogs/robp/default.aspx">Rob Pellicaan IS Blog</a>.<br />
<br /><a href="/blogs/robp/archive/2009/11/24/sql-server-mvp-deep-dives-something-for-your-christmas-wish-list.aspx">Permalink</a><br /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dataprofessional.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dataprofessional.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dataprofessional.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dataprofessional.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dataprofessional.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dataprofessional.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dataprofessional.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dataprofessional.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dataprofessional.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dataprofessional.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dataprofessional.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dataprofessional.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dataprofessional.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dataprofessional.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=43&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dataprofessional.wordpress.com/2009/11/24/sql-server-mvp-deep-dives-something-for-your-christmas-wish-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b7dc3391ad28ac4e0af9083a44d4cf71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dataprofessional</media:title>
		</media:content>
	</item>
		<item>
		<title>Auto-create your Installation manual with the Problem Steps Recorder</title>
		<link>http://dataprofessional.wordpress.com/2009/11/24/auto-create-your-installation-manual-with-the-problem-steps-recorder/</link>
		<comments>http://dataprofessional.wordpress.com/2009/11/24/auto-create-your-installation-manual-with-the-problem-steps-recorder/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 15:09:28 +0000</pubDate>
		<dc:creator>dataprofessional</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://dataprofessional.wordpress.com/2009/11/24/auto-create-your-installation-manual-with-the-problem-steps-recorder/</guid>
		<description><![CDATA[I saw someone from Microsoft demonstrate a very cool feature included in Windows 7 and Windows Server 2008 R2. It is called the Problem Steps Recorder. You can launch it by running psr.exe. I find it very useful not for problem reporting, but for documenting installation steps, because it will follow you in every step [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=42&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I saw someone from Microsoft demonstrate a very cool feature included in Windows 7 and Windows Server 2008 R2. It is called the Problem Steps Recorder. You can launch it by running psr.exe.</p>
<p>I find it very useful not for problem reporting, but for documenting installation steps, because it will follow you in every step you take, with screenshots and comments. No more copy and pasting individual screenshots and documenting them!</p>
<p>A little demo and some more details: <a href="http://www.istartedsomething.com/20090111/windows-7-problem-steps-recorder-miracle-tool/">http://www.istartedsomething.com/20090111/windows-7-problem-steps-recorder-miracle-tool/</a></p>
<p><b>Note:</b> Cross posted from <a href="http://blogs.infosupport.com/blogs/robp/default.aspx">Rob Pellicaan IS Blog</a>.<br />
<br /><a href="/blogs/robp/archive/2009/11/24/auto-create-your-installation-manual-with-the-problem-steps-recorder.aspx">Permalink</a><br /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dataprofessional.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dataprofessional.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dataprofessional.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dataprofessional.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dataprofessional.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dataprofessional.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dataprofessional.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dataprofessional.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dataprofessional.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dataprofessional.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dataprofessional.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dataprofessional.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dataprofessional.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dataprofessional.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=42&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dataprofessional.wordpress.com/2009/11/24/auto-create-your-installation-manual-with-the-problem-steps-recorder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b7dc3391ad28ac4e0af9083a44d4cf71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dataprofessional</media:title>
		</media:content>
	</item>
		<item>
		<title>Some Ways To Look For Things in SQL Server Modules</title>
		<link>http://dataprofessional.wordpress.com/2009/11/24/some-ways-to-look-for-things-in-sql-server-modules/</link>
		<comments>http://dataprofessional.wordpress.com/2009/11/24/some-ways-to-look-for-things-in-sql-server-modules/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 14:26:03 +0000</pubDate>
		<dc:creator>dataprofessional</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://dataprofessional.wordpress.com/2009/11/24/some-ways-to-look-for-things-in-sql-server-modules/</guid>
		<description><![CDATA[Quote from http://glennberrysqlperformance.spaces.live.com/Blog/cns!45041418ECCAA960!2218.entry: If you have a medium to large database in SQL Server, with lots of stored procedures, functions or views, it can sometimes be difficult to keep track of whether you have used certain options (such as RECOMPILE).&#160; The queries below show some different things you can discover by querying sys.sql_modules and sys.objects. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=41&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Quote from <a title="http://glennberrysqlperformance.spaces.live.com/Blog/cns!45041418ECCAA960!2218.entry" href="http://glennberrysqlperformance.spaces.live.com/Blog/cns!45041418ECCAA960!2218.entry">http://glennberrysqlperformance.spaces.live.com/Blog/cns!45041418ECCAA960!2218.entry</a>: </p>
<p>If you have a medium to large database in SQL Server, with lots of stored procedures, functions or views, it can sometimes be difficult to keep track of whether you have used certain options (such as RECOMPILE).&#160; The queries below show some different things you can discover by querying sys.sql_modules and sys.objects.</p>
<p>&#160;</p>
<pre>-- List all modules in the current database
    SELECT OBJECT_NAME(sm.[object_id]) AS [object_name], o.[type],
           o.type_desc, sm.[definition]
    FROM sys.sql_modules AS sm
    INNER JOIN sys.objects AS o
    ON sm.[object_id] = o.[object_id]
    ORDER BY o.[type];

    -- Look for modules that use a specific term (Method 1)
    SELECT OBJECT_NAME(sm.[object_id]) AS [Object Name], sm.[definition]
    FROM sys.sql_modules AS sm
    WHERE sm.[definition] LIKE '%SQLCONTENT01%';

    -- Look for modules that use a specific term (Method 2)
    SELECT OBJECT_NAME(id) AS [Object Name], [text]
    FROM sys.syscomments
    WHERE [text] LIKE '%SQLCONTENT01%'

    -- Find stored procedures that have WITH RECOMPILE set
    SELECT OBJECT_NAME(sm.[object_id]) AS [Object Name],
           sm.[definition], sm.is_recompiled
    FROM sys.sql_modules AS sm
    INNER JOIN sys.objects AS o
    ON sm.[object_id] = o.[object_id]
    WHERE sm.is_recompiled = 1
    AND o.type_desc = 'SQL_STORED_PROCEDURE';</pre>
<p><b>Note:</b> Cross posted from <a href="http://blogs.infosupport.com/blogs/robp/default.aspx">Rob Pellicaan IS Blog</a>.<br />
<br /><a href="/blogs/robp/archive/2009/11/24/some-ways-to-look-for-things-in-sql-server-modules.aspx">Permalink</a><br /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dataprofessional.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dataprofessional.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dataprofessional.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dataprofessional.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dataprofessional.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dataprofessional.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dataprofessional.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dataprofessional.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dataprofessional.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dataprofessional.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dataprofessional.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dataprofessional.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dataprofessional.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dataprofessional.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=41&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dataprofessional.wordpress.com/2009/11/24/some-ways-to-look-for-things-in-sql-server-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b7dc3391ad28ac4e0af9083a44d4cf71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dataprofessional</media:title>
		</media:content>
	</item>
		<item>
		<title>How to disable Time sync on a VirtualBox VM</title>
		<link>http://dataprofessional.wordpress.com/2009/11/12/how-to-disable-time-sync-on-a-virtualbox-vm-2/</link>
		<comments>http://dataprofessional.wordpress.com/2009/11/12/how-to-disable-time-sync-on-a-virtualbox-vm-2/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 10:46:41 +0000</pubDate>
		<dc:creator>dataprofessional</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://dataprofessional.wordpress.com/2009/11/12/how-to-disable-time-sync-on-a-virtualbox-vm-2/</guid>
		<description><![CDATA[I wanted to start looking at the new SQL2008 R2 November CTP and decided that I would go for a installation on Windows Server 2008 R2 on a VM. Since I am running Windows 7, Hyper-V is not an option and Microsoft has let us down by still not providing us with a 64-bit virtualization [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=39&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I wanted to start looking at the new SQL2008 R2 November CTP and decided that I would go for a installation on Windows Server 2008 R2 on a VM. Since I am running Windows 7, Hyper-V is not an option and Microsoft has let us down by still not providing us with a 64-bit virtualization client. </p>
<p>So I decided I would go for Sun’s VirtualBox and download and install the 180-day trail of Windows Server 2008 R2. </p>
<p>I want to try and see if extending the 180 expiration still works by disabling the timesync between the host and the vm, so only the time that the VM is actually on counts up to the 180 days (see <a title="Dealing with the Team System 2010 CTP expiration" href="http://blogs.msdn.com/jeffbe/archive/2008/12/09/dealing-with-the-team-system-2010-ctp-expiration.aspx">Dealing with the Team System 2010 CTP expiration</a>)</p>
<p>A way to disable the timesync was posted by Rick Guyer: <a href="http://rickguyer.com/virtualbox-disable-time-sync-between-host-and-client/">VirtualBox: Disable time sync between host and client</a>. </p>
<p>Some additional comments: </p>
<p>1) vboxmanage.exe is in C:\Program Files\Sun\VirtualBox on the <strong>host</strong>.</p>
<p>2) the VM has to be shutdown. It will not return a error when is running, but it won’t work.</p>
<p>3) You have to also disable the Internet Time sync within your guest OS.</p>
<p>&#160;</p>
<p>Update!&#160; WARNING: When you shutdown the VM and then start it again, it will resync the time once. So until I find a better solution, I have to make sure to never shutdown the VM, but use either “restart” or “save state”. </p>
<p>&#160;</p>
<p>On the positive side: Man, this combination (VirtualBox + Windows 2008 R2) is fast! Boot-up time of the VM til the CTRL-ALT-DEL is only 20 seconds!</p>
<p><b>Note:</b> Cross posted from <a href="http://blogs.infosupport.com/blogs/robp/default.aspx">Rob Pellicaan IS Blog</a>.<br />
<br /><a href="/blogs/robp/archive/2009/11/12/how-to-disable-time-sync-on-a-virtualbox-vm.aspx">Permalink</a><br /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dataprofessional.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dataprofessional.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dataprofessional.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dataprofessional.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dataprofessional.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dataprofessional.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dataprofessional.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dataprofessional.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dataprofessional.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dataprofessional.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dataprofessional.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dataprofessional.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dataprofessional.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dataprofessional.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=39&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dataprofessional.wordpress.com/2009/11/12/how-to-disable-time-sync-on-a-virtualbox-vm-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b7dc3391ad28ac4e0af9083a44d4cf71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dataprofessional</media:title>
		</media:content>
	</item>
		<item>
		<title>Replacing * with column names the easy way</title>
		<link>http://dataprofessional.wordpress.com/2009/11/11/replacing-with-column-names-the-easy-way/</link>
		<comments>http://dataprofessional.wordpress.com/2009/11/11/replacing-with-column-names-the-easy-way/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 11:14:54 +0000</pubDate>
		<dc:creator>dataprofessional</dc:creator>
				<category><![CDATA[Productivity]]></category>

		<guid isPermaLink="false">http://dataprofessional.wordpress.com/2009/11/11/replacing-with-column-names-the-easy-way/</guid>
		<description><![CDATA[Just open Object Explorer, expand the table or view name, click on the &#8220;Columns&#8221; node and drag it onto the query window: &#160; Thanks goes out to Aaron Bertrand for posting this trick on his blog: http://sqlblog.com/blogs/aaron_bertrand/archive/2009/10/10/bad-habits-to-kick-using-select-omitting-the-column-list.aspx Note: Cross posted from Rob Pellicaan IS Blog. Permalink<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=34&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just open Object Explorer, expand the table or view name, click on the &#8220;Columns&#8221; node and drag it onto the query window:</p>
<p><img src="http://sqlblog.com/files/folders/17506/download.aspx" alt="" /></p>
<p><img src="http://sqlblog.com/files/folders/17507/download.aspx" alt="" /></p>
<p>&nbsp;</p>
<p>Thanks goes out to Aaron Bertrand for posting this trick on his blog:</p>
<p><a href="http://sqlblog.com/blogs/aaron_bertrand/archive/2009/10/10/bad-habits-to-kick-using-select-omitting-the-column-list.aspx">http://sqlblog.com/blogs/aaron_bertrand/archive/2009/10/10/bad-habits-to-kick-using-select-omitting-the-column-list.aspx</a></p>
<p><strong>Note:</strong> Cross posted from <a href="http://blogs.infosupport.com/blogs/robp/default.aspx">Rob Pellicaan IS Blog</a>.</p>
<p><a href="/blogs/robp/archive/2009/11/11/replacing-with-column-names-the-easy-way.aspx">Permalink</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dataprofessional.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dataprofessional.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dataprofessional.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dataprofessional.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dataprofessional.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dataprofessional.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dataprofessional.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dataprofessional.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dataprofessional.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dataprofessional.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dataprofessional.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dataprofessional.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dataprofessional.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dataprofessional.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=34&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dataprofessional.wordpress.com/2009/11/11/replacing-with-column-names-the-easy-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b7dc3391ad28ac4e0af9083a44d4cf71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dataprofessional</media:title>
		</media:content>

		<media:content url="http://sqlblog.com/files/folders/17506/download.aspx" medium="image" />

		<media:content url="http://sqlblog.com/files/folders/17507/download.aspx" medium="image" />
	</item>
		<item>
		<title>Where did that money go?</title>
		<link>http://dataprofessional.wordpress.com/2009/11/11/where-did-that-money-go/</link>
		<comments>http://dataprofessional.wordpress.com/2009/11/11/where-did-that-money-go/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 10:20:46 +0000</pubDate>
		<dc:creator>dataprofessional</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://dataprofessional.wordpress.com/2009/11/11/where-did-that-money-go/</guid>
		<description><![CDATA[This might be something most developers are already aware of, but I have been familiar with SQL Server mostly as a DBA, not actively busy with the meaning of data and it therefore came as a complete surprise to me. Question: How much is $1/$345, rounded at 4 decimals? Take a calculator and it will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=32&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><code>This might be something most developers are already aware of, but I have been familiar with SQL Server mostly as a DBA, not actively busy with the meaning of data and it therefore came as a complete surprise to me.</code></p>
<p><code>Question: How much is $1/$345, rounded at 4 decimals? </code></p>
<p><code>Take a calculator and it will tell you: 0.0029. </code></p>
<p><code>Take Excel and it will tell you: 0.0029.</code></p>
<p><code>Take SQL Server and it will tell you: 0.0028.</code></p>
<p><code>Euh… wait a minute… did you say 0.0028? Isn’t that 3-4% off?</code></p>
<p><code>Seems SQL Server, when using the MONEY datatype, doesn’t round values, but truncates them instead. See the example below. I think it’s pretty shocking.</code></p>
<p>declare @m1 money, @m2 money, @r1 decimal(19,4)   <br />declare @d1 decimal(19,4), @d2 decimal(19,4), @r2 decimal(19,4)    <br />declare @f1 float, @f2 float, @r3 float;    <br />set @m1 = 1.00;    <br />set @m2 = 345.00;    <br />set @r1 = @m1/@m2;    <br />set @d1 = 1.00;    <br />set @d2 = 345.00;    <br />set @r2 = @d1/@d2;    <br />set @f1 = 1.00;    <br />set @f2 = 345.00;    <br />set @r3 = @f1/@f2;    <br />select @r1, @r2, @r3;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dataprofessional.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dataprofessional.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dataprofessional.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dataprofessional.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dataprofessional.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dataprofessional.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dataprofessional.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dataprofessional.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dataprofessional.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dataprofessional.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dataprofessional.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dataprofessional.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dataprofessional.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dataprofessional.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=32&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dataprofessional.wordpress.com/2009/11/11/where-did-that-money-go/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b7dc3391ad28ac4e0af9083a44d4cf71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dataprofessional</media:title>
		</media:content>
	</item>
		<item>
		<title>Bad Habits to Kick (T-SQL best practices)</title>
		<link>http://dataprofessional.wordpress.com/2009/11/11/bad-habits-to-kick-t-sql-best-practices/</link>
		<comments>http://dataprofessional.wordpress.com/2009/11/11/bad-habits-to-kick-t-sql-best-practices/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 23:36:04 +0000</pubDate>
		<dc:creator>dataprofessional</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://dataprofessional.wordpress.com/2009/11/11/bad-habits-to-kick-t-sql-best-practices/</guid>
		<description><![CDATA[I am currently busy reviewing and updating the internal programming guidelines and best practices for SQL Server programming. While looking on the net for other opinions on subjects, I came across a nice set of articles on best practices from Aaron Bertrand: http://sqlblog.com/blogs/aaron_bertrand/archive/tags/best+practices/default.aspx, a recommended read for all T-SQL programmers! &#160; A interesting follow-up on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=12&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am currently busy reviewing and updating the internal programming guidelines and best practices for SQL Server programming. While looking on the net for other opinions on subjects, I came across a nice set of articles on best practices from Aaron Bertrand: <a title="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/best+practices/default.aspx" href="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/best+practices/default.aspx">http://sqlblog.com/blogs/aaron_bertrand/archive/tags/best+practices/default.aspx</a>, a recommended read for all T-SQL programmers!</p>
<p>&#160;</p>
<p>A interesting follow-up on one of the articles was made though by Adam Machanic that undermined one of our own best practices for a bit (which was to not use conversions or functions on the left side of a WHERE clause, because it prevents indexes from being used effectively). What Adam showed was that in SQL 2008, in conjunction with the addition of the DATE type, the query optimizer received a minor upgrade, which makes the following query use an Index Seek instead of a full Index Scan. </p>
<p>SELECT    <br />&#160;&#160;&#160; COUNT(*)     <br />FROM #dates     <br />WHERE     <br />&#160;&#160;&#160; CONVERT(DATE, the_date) = CONVERT(DATE, GETDATE());     <br />GO</p>
<p>I am interested in how many more of these query optimizations have been implemented and will be implemented in the future.</p>
<p>Full details on his blog: <a title="http://sqlblog.com/blogs/adam_machanic/archive/2009/10/20/what-happened-today-date-and-date-ranges-over-datetime.aspx" href="http://sqlblog.com/blogs/adam_machanic/archive/2009/10/20/what-happened-today-date-and-date-ranges-over-datetime.aspx">http://sqlblog.com/blogs/adam_machanic/archive/2009/10/20/what-happened-today-date-and-date-ranges-over-datetime.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dataprofessional.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dataprofessional.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dataprofessional.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dataprofessional.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dataprofessional.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dataprofessional.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dataprofessional.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dataprofessional.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dataprofessional.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dataprofessional.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dataprofessional.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dataprofessional.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dataprofessional.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dataprofessional.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dataprofessional.wordpress.com&amp;blog=10423956&amp;post=12&amp;subd=dataprofessional&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dataprofessional.wordpress.com/2009/11/11/bad-habits-to-kick-t-sql-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b7dc3391ad28ac4e0af9083a44d4cf71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dataprofessional</media:title>
		</media:content>
	</item>
	</channel>
</rss>
