<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Aaron Bertrand</title><link>http://sqlblog.com/blogs/aaron_bertrand/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>How do the links in YOUR copy of SQL Server 2008 Books Online work?</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/19/how-do-the-links-in-your-copy-of-sql-server-2008-books-online-work.aspx</link><pubDate>Sat, 19 Jul 2008 23:55:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7914</guid><dc:creator>AaronBertrand</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/aaron_bertrand/comments/7914.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/aaron_bertrand/commentrss.aspx?PostID=7914</wfw:commentRss><description>&lt;p&gt;I am just taking a quick show of hands; and maybe some information, if you are willing.&amp;nbsp; (And if this hasn't happened to you, I apologize for taking up your time.)&lt;/p&gt;&lt;p&gt;I have had various problems on multiple installations of Books Online throughout the entire Katmai / SQL Server 2008 cycle.&amp;nbsp; They have been on both 32 and 64-bit; with / without IE8 installed; and with / without Visual Studio installed.&lt;br&gt;&lt;/p&gt;&lt;p&gt;Currently I have one instance where IE8 is not installed, BOL is alongside 2005 on Server 2003, and every single link is not clickable at all.&amp;nbsp; Just no response... I can only navigate to items through the index or search results.&amp;nbsp; On a similar machine the links work, but every single one leads to a page that says, "Sorry, no topics were found for the selected link."&amp;nbsp; Again I must navigate via index or search results.&amp;nbsp; Which is really too bad, because some of those links are much tougher to track down.&amp;nbsp; And now I came across a much more isolated case where on a Vista SP1 machine with IE8 installed, a certain link leads to this "sorry" page from one topic, but not from another topic (the difference is an xmlns attribute in the link, which I think may be the cause of the problem).&lt;/p&gt;&lt;p&gt;You can see what I am talking about in more detail in the following Connect items: &lt;/p&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=290461" title="#290461" target="_blank"&gt;http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=290461&lt;/a&gt; &lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=357008" title="357008" target="_blank"&gt;http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=357008 &lt;/a&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;(I have some other items about messed-up formatting in IE8, and a lot of others have submitted the same.&amp;nbsp; But I am more curious here about the links, as the formatting issue is being addressed.) &lt;br&gt;&lt;/p&gt;&lt;p&gt;I can't imagine that this kind of thing happens differently across every single machine / VM I use, but it doesn't happen to anyone else?&amp;nbsp; If you have had any issues clicking links in Books Online, please drop a note here providing any specific information we can relay back to Microsoft so they can try harder to reproduce these issues.&amp;nbsp; I mean really, I am not making this stuff up... please help me escape from this madness!&lt;br&gt;&lt;/p&gt;&lt;p&gt;Thanks! &lt;br&gt;&lt;/p&gt;
&lt;BR&gt;&lt;div class = "shareblock"&gt;&lt;span class = "shareblockTitle"&gt;Share this post:&lt;/span&gt;&lt;span class = "shareblockLink"&gt; &lt;a href = "mailto:?subject=How do the links in YOUR copy of SQL Server 2008 Books Online work?&amp;amp;body=Seen on SQLblog.com: %0A%0A%09How do the links in YOUR copy of SQL Server 2008 Books Online work?%0A%0Ahttp://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/19/how-do-the-links-in-your-copy-of-sql-server-2008-books-online-work.aspx" target="_blank" title = "Email How do the links in YOUR copy of SQL Server 2008 Books Online work?"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/19/how-do-the-links-in-your-copy-of-sql-server-2008-books-online-work.aspx&amp;amp;title=How+do+the+links+in+YOUR+copy+of+SQL+Server+2008+Books+Online+work%3f" target="_blank" title = "Submit How do the links in YOUR copy of SQL Server 2008 Books Online work? to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/19/how-do-the-links-in-your-copy-of-sql-server-2008-books-online-work.aspx&amp;amp;phase=2" target="_blank" title = "Submit How do the links in YOUR copy of SQL Server 2008 Books Online work? to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/19/how-do-the-links-in-your-copy-of-sql-server-2008-books-online-work.aspx&amp;amp;title=How+do+the+links+in+YOUR+copy+of+SQL+Server+2008+Books+Online+work%3f" target="_blank" title = "Submit How do the links in YOUR copy of SQL Server 2008 Books Online work? to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/19/how-do-the-links-in-your-copy-of-sql-server-2008-books-online-work.aspx&amp;amp;title=How+do+the+links+in+YOUR+copy+of+SQL+Server+2008+Books+Online+work%3f" target="_blank" title = "Submit How do the links in YOUR copy of SQL Server 2008 Books Online work? to DotNetKicks"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/19/how-do-the-links-in-your-copy-of-sql-server-2008-books-online-work.aspx&amp;amp;title=How+do+the+links+in+YOUR+copy+of+SQL+Server+2008+Books+Online+work%3f&amp;amp;;top=1" target="_blank" title = "Add How do the links in YOUR copy of SQL Server 2008 Books Online work? to Live Bookmarks"&gt;live it!&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://info.sqlblog.com/a.aspx?ZoneID=0&amp;BannerID=12&amp;AdvertiserID=1&amp;CampaignID=12&amp;Task=Get&amp;Mode=TEXT&amp;SiteID=1&amp;RandomNumber=463323" width="1" height="1" border="0"&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=7914" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/katmai/default.aspx">katmai</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/books+online/default.aspx">books online</category></item><item><title>Performance Advisor : A Quick "Two Thumbs Up"</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/15/performance-advisor-a-quick-two-thumbs-up.aspx</link><pubDate>Tue, 15 Jul 2008 20:48:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7858</guid><dc:creator>AaronBertrand</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/aaron_bertrand/comments/7858.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/aaron_bertrand/commentrss.aspx?PostID=7858</wfw:commentRss><description>&lt;p&gt;I have been playing with &lt;a href="http://www.sqlsentry.net/performance-advisor/sql-server-performance.asp" title="Performance Advisor" target="_blank"&gt;Performance Advisor&lt;/a&gt;, the new companion to the very popular &lt;a href="http://www.sqlsentry.net/event-manager/enterprise-sql-server.asp" title="Event Manager" target="_blank"&gt;Event Manager&lt;/a&gt; software from &lt;a href="http://www.sqlsentry.net/" title="SQL Sentry" target="_blank"&gt;SQL Sentry&lt;/a&gt;.&amp;nbsp; Right off the bat, I can tell you that this tool should have Quest and Idera shaking in their boots, as it is really going to give them a run for their money.&amp;nbsp; While a late comer to this segment of the market, Performance Advisor has definitely been worth the wait.&lt;br&gt;&lt;br&gt;Rather than a big long bulleted list detailing every last feature, or demonstrating the differences between the products, I would rather highlight the three features that I like best so far, and that are already saving me time.&lt;br&gt;&lt;br&gt;&lt;b&gt;Disk Activity&lt;/b&gt;&lt;br&gt;&lt;br&gt;This tab provides a visual depiction of your disks, the database files on each disk, and read/write activity.&amp;nbsp; It allows you to quickly identify I/O issues as they are happening.&amp;nbsp; Dashed lines will show current activity, and a tooltip over a database file tells you which database it represents, and whether it is data or log.&amp;nbsp; Like the arrows between operators in a graphical execution plan, thicker dashes mean heavier I/O and latency, with the addition of movement and color as visual cues to warn you about bottlenecks.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;a href="http://www.aaronbertrand.com/PA_Blog/disk_activity.gif" title="Click to enlarge" target="_blank"&gt;&lt;img src="http://www.aaronbertrand.com/PA_Blog/disk_activity_t.gif" title="Disk Activity" alt="Disk Activity" width="425" border="1" height="315"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Top SQL Analysis&lt;/b&gt;&lt;br&gt;&lt;br&gt;Like it sounds, this shows the most resource intensive statements, and you can quickly rank by specific resource type (e.g. CPU, or I/O, or duration).&amp;nbsp; Filtering and sorting are effortless, and all this without having to go and manually run a trace.&amp;nbsp; The best part about this is that I can see individual statements (including actual parameters), or I can "normalize" and aggregate the statements to have placeholders for parameters (like you can do to some extent now, with a lot of manual work, or by using a tool like &lt;a href="http://www.cleardata.biz/cleartrace/default.aspx" title="ClearTrace" target="_blank"&gt;ClearTrace&lt;/a&gt;).&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.aaronbertrand.com/PA_Blog/top_sql.gif" title="Click to enlarge" target="_blank"&gt;&lt;img src="http://www.aaronbertrand.com/PA_Blog/top_sql_t.gif" title="Top SQL Analysis" alt="Top SQL Analysis" width="425" border="1" height="211"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Dashboard&lt;/b&gt;&lt;br&gt;&lt;br&gt;Very rarely do you come across the perfect balance of form and function; but, these folks have done it here, in my eyes.&amp;nbsp; The dashboard has pretty much all of the useful metrics that I would want to see at a glance, and best of all, it is SEXY.&amp;nbsp; You can switch between current metrics, and a different view which shows historical trends.&amp;nbsp; The latter allows you to quickly see peaks and valleys, and determine whether the current scenario for any metric has been normal over the given time range.&amp;nbsp; And their QuickTrace functionality means I will likely never need to run Profiler again.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.aaronbertrand.com/PA_Blog/dashboard_c.gif" title="Click to enlarge" target="_blank"&gt;&lt;img src="http://www.aaronbertrand.com/PA_Blog/dashboard_c_t.gif" title="PA Dashboard - current" alt="PA Dashboard - current" width="425" border="1" height="307"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.aaronbertrand.com/PA_Blog/dashboard_h.gif" title="Click to enlarge" target="_blank"&gt;&lt;img src="http://www.aaronbertrand.com/PA_Blog/dashboard_h_t.gif" title="PA Dashboard - historical" alt="PA Dashboard - historical" width="425" border="1" height="307"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I encourage you to take a look and, if you like what you see, download the trial!&lt;br&gt;&lt;/p&gt;
&lt;BR&gt;&lt;div class = "shareblock"&gt;&lt;span class = "shareblockTitle"&gt;Share this post:&lt;/span&gt;&lt;span class = "shareblockLink"&gt; &lt;a href = "mailto:?subject=Performance Advisor : A Quick &amp;quot;Two Thumbs Up&amp;quot;&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Performance Advisor : A Quick &amp;quot;Two Thumbs Up&amp;quot;%0A%0Ahttp://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/15/performance-advisor-a-quick-two-thumbs-up.aspx" target="_blank" title = "Email Performance Advisor : A Quick &amp;quot;Two Thumbs Up&amp;quot;"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/15/performance-advisor-a-quick-two-thumbs-up.aspx&amp;amp;title=Performance+Advisor+%3a+A+Quick+%26quot%3bTwo+Thumbs+Up%26quot%3b" target="_blank" title = "Submit Performance Advisor : A Quick &amp;quot;Two Thumbs Up&amp;quot; to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/15/performance-advisor-a-quick-two-thumbs-up.aspx&amp;amp;phase=2" target="_blank" title = "Submit Performance Advisor : A Quick &amp;quot;Two Thumbs Up&amp;quot; to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/15/performance-advisor-a-quick-two-thumbs-up.aspx&amp;amp;title=Performance+Advisor+%3a+A+Quick+%26quot%3bTwo+Thumbs+Up%26quot%3b" target="_blank" title = "Submit Performance Advisor : A Quick &amp;quot;Two Thumbs Up&amp;quot; to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/15/performance-advisor-a-quick-two-thumbs-up.aspx&amp;amp;title=Performance+Advisor+%3a+A+Quick+%26quot%3bTwo+Thumbs+Up%26quot%3b" target="_blank" title = "Submit Performance Advisor : A Quick &amp;quot;Two Thumbs Up&amp;quot; to DotNetKicks"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/15/performance-advisor-a-quick-two-thumbs-up.aspx&amp;amp;title=Performance+Advisor+%3a+A+Quick+%26quot%3bTwo+Thumbs+Up%26quot%3b&amp;amp;;top=1" target="_blank" title = "Add Performance Advisor : A Quick &amp;quot;Two Thumbs Up&amp;quot; to Live Bookmarks"&gt;live it!&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://info.sqlblog.com/a.aspx?ZoneID=0&amp;BannerID=12&amp;AdvertiserID=1&amp;CampaignID=12&amp;Task=Get&amp;Mode=TEXT&amp;SiteID=1&amp;RandomNumber=463323" width="1" height="1" border="0"&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=7858" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/Performance+Advisor/default.aspx">Performance Advisor</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/3rd+party+tools/default.aspx">3rd party tools</category></item><item><title>Very important SQL Server update</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/08/very-important-sql-server-update.aspx</link><pubDate>Tue, 08 Jul 2008 21:32:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7732</guid><dc:creator>AaronBertrand</dc:creator><slash:comments>3</slash:comments><comments>http://sqlblog.com/blogs/aaron_bertrand/comments/7732.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/aaron_bertrand/commentrss.aspx?PostID=7732</wfw:commentRss><description>&lt;p&gt;There is a patch available for four elevation of privilege vulnerabilities recently discovered in SQL Server.&lt;br&gt;&lt;br&gt;From &lt;a href="http://www.microsoft.com/technet/security/bulletin/ms08-Jul.mspx" title="July 2008 Security Bulletin" target="_blank"&gt;http://www.microsoft.com/technet/security/bulletin/ms08-Jul.mspx&lt;/a&gt;:&lt;br&gt;&lt;br&gt;This security update resolves four privately disclosed vulnerabilities. The more serious of the vulnerabilities could allow an attacker to run code and to take complete control of an affected system. An authenticated attacker could then install programs; view, change, or delete data; or create new accounts with full administrative rights.&lt;br&gt;&lt;br&gt;Microsoft Baseline Security Analyzer can detect whether your computer system requires this update. The update may require a restart.&lt;br&gt;&lt;br&gt;Get the update here:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.microsoft.com/technet/security/bulletin/ms08-040.mspx" title="MS Security Bulletin 08-040" target="_blank"&gt;http://www.microsoft.com/technet/security/bulletin/ms08-040.mspx&lt;/a&gt;&lt;/p&gt;
&lt;BR&gt;&lt;div class = "shareblock"&gt;&lt;span class = "shareblockTitle"&gt;Share this post:&lt;/span&gt;&lt;span class = "shareblockLink"&gt; &lt;a href = "mailto:?subject=Very important SQL Server update&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Very important SQL Server update%0A%0Ahttp://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/08/very-important-sql-server-update.aspx" target="_blank" title = "Email Very important SQL Server update"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/08/very-important-sql-server-update.aspx&amp;amp;title=Very+important+SQL+Server+update" target="_blank" title = "Submit Very important SQL Server update to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/08/very-important-sql-server-update.aspx&amp;amp;phase=2" target="_blank" title = "Submit Very important SQL Server update to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/08/very-important-sql-server-update.aspx&amp;amp;title=Very+important+SQL+Server+update" target="_blank" title = "Submit Very important SQL Server update to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/08/very-important-sql-server-update.aspx&amp;amp;title=Very+important+SQL+Server+update" target="_blank" title = "Submit Very important SQL Server update to DotNetKicks"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/08/very-important-sql-server-update.aspx&amp;amp;title=Very+important+SQL+Server+update&amp;amp;;top=1" target="_blank" title = "Add Very important SQL Server update to Live Bookmarks"&gt;live it!&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://info.sqlblog.com/a.aspx?ZoneID=0&amp;BannerID=12&amp;AdvertiserID=1&amp;CampaignID=12&amp;Task=Get&amp;Mode=TEXT&amp;SiteID=1&amp;RandomNumber=463323" width="1" height="1" border="0"&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=7732" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/security/default.aspx">security</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/Vulnerability/default.aspx">Vulnerability</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/patches/default.aspx">patches</category></item><item><title>A little Management Studio "oops"</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/07/a-little-management-studio-oops.aspx</link><pubDate>Mon, 07 Jul 2008 16:38:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7696</guid><dc:creator>AaronBertrand</dc:creator><slash:comments>3</slash:comments><comments>http://sqlblog.com/blogs/aaron_bertrand/comments/7696.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/aaron_bertrand/commentrss.aspx?PostID=7696</wfw:commentRss><description>&lt;p&gt;For those of you who connect to database servers where you are not in full control over all databases, or where some of your databases are ever offline (or auto-closed), the new version of Management Studio that is shipping with SQL Server 2008 is going to bring you some surprises, when you try to present a list of databases in Object Explorer.&lt;br&gt;&lt;br&gt;It seems that the ability to do so is hinged upon the columns that are set up in Object Explorer Details by default.&amp;nbsp; In the case I came across yesterday, the offender was "Collation."&amp;nbsp; The problem is that for a database that is offline or has been auto-closed, collation comes back as NULL.&amp;nbsp; Well, that's not really the problem... the real problem is that SSMS throws its hands in the air when it comes across NULL for these values, and assumes this is NULL because you don't have permission.&amp;nbsp; So it throws up this error:&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.aaronbertrand.com/voodoo/db_list_error_message.gif" title="Permissions error" alt="Permissions error" width="610" border="1" height="195"&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;And then refuses to show the data for ANY database, instead of just hiding the one(s) that caused the error.&amp;nbsp; And this is true whether or not you have Object Explorer Details even open (my guess here is that the contents of OED are cached behind the scenes, even when it is disabled... which I speculate may be part of the reason behind the sluggishness that many have complained about).&amp;nbsp; You can read more about this in &lt;a href="http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=354322" title="Connect #354322" target="_blank"&gt;Connect #354322&lt;/a&gt; and in &lt;a href="http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=354291" title="Connect #354291" target="_blank"&gt;Connect #354291&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;For those of you that connect to databases that are hosted by 3rd party providers, some of which are accustomed to leaving as many databases in auto-close mode as possible, you are first going to have to go to Object Explorer Details, right-click the column header list, and un-check Collation.&amp;nbsp; At this point, if you refresh the Databases node in Object Explorer, you should again see all of the databases on the server, even those where you don't have access.&amp;nbsp; Strangely enough, OED still shows you some other data by default, that it probably shouldn't (e.g. recovery model, last backup, owner).&lt;br&gt;&lt;br&gt;I have been pushing for the deprecation of AutoClose for a while (see &lt;a href="http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=238888" title="Connect #238888" target="_blank"&gt;Connect #238888&lt;/a&gt;), but so far it hasn't gained any traction.&lt;br&gt;&lt;br&gt;A twist on this that I think is an important problem is that if you add a column to the Object Explorer Details view, say Data Space Used, if you fail to meet permissions requirements on even one database in the list, you get the same error shown above, and NONE of the data is displayed for any database at all.&amp;nbsp; Couldn't they just put N/A or leave the value blank, for the database(s) where you are not allowed to see this information?&amp;nbsp; I don't think they have really thought this solution through, since they are ignoring an entire market of people who use shared hosting for SQL Server.&amp;nbsp; If I have five databases on a host and there are twenty others, I should be able to see the data space usage for MY databases.&amp;nbsp; I posted a Connect item about this of course, too, and would appreciate your support in making it more visible:&lt;/p&gt;&lt;p&gt;&lt;a href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=355238" title="Connect #355238" target="_blank"&gt;http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=355238 &lt;/a&gt;&lt;br&gt;&lt;/p&gt;
&lt;BR&gt;&lt;div class = "shareblock"&gt;&lt;span class = "shareblockTitle"&gt;Share this post:&lt;/span&gt;&lt;span class = "shareblockLink"&gt; &lt;a href = "mailto:?subject=A little Management Studio &amp;quot;oops&amp;quot;&amp;amp;body=Seen on SQLblog.com: %0A%0A%09A little Management Studio &amp;quot;oops&amp;quot;%0A%0Ahttp://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/07/a-little-management-studio-oops.aspx" target="_blank" title = "Email A little Management Studio &amp;quot;oops&amp;quot;"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/07/a-little-management-studio-oops.aspx&amp;amp;title=A+little+Management+Studio+%26quot%3boops%26quot%3b" target="_blank" title = "Submit A little Management Studio &amp;quot;oops&amp;quot; to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/07/a-little-management-studio-oops.aspx&amp;amp;phase=2" target="_blank" title = "Submit A little Management Studio &amp;quot;oops&amp;quot; to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/07/a-little-management-studio-oops.aspx&amp;amp;title=A+little+Management+Studio+%26quot%3boops%26quot%3b" target="_blank" title = "Submit A little Management Studio &amp;quot;oops&amp;quot; to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/07/a-little-management-studio-oops.aspx&amp;amp;title=A+little+Management+Studio+%26quot%3boops%26quot%3b" target="_blank" title = "Submit A little Management Studio &amp;quot;oops&amp;quot; to DotNetKicks"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/07/a-little-management-studio-oops.aspx&amp;amp;title=A+little+Management+Studio+%26quot%3boops%26quot%3b&amp;amp;;top=1" target="_blank" title = "Add A little Management Studio &amp;quot;oops&amp;quot; to Live Bookmarks"&gt;live it!&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://info.sqlblog.com/a.aspx?ZoneID=0&amp;BannerID=12&amp;AdvertiserID=1&amp;CampaignID=12&amp;Task=Get&amp;Mode=TEXT&amp;SiteID=1&amp;RandomNumber=463323" width="1" height="1" border="0"&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=7696" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/SSMS/default.aspx">SSMS</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category></item><item><title>sys.dm_exec_requests</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/01/sys-dm-exec-requests.aspx</link><pubDate>Tue, 01 Jul 2008 21:44:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7608</guid><dc:creator>AaronBertrand</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/aaron_bertrand/comments/7608.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/aaron_bertrand/commentrss.aspx?PostID=7608</wfw:commentRss><description>One of the dynamic management views (DMVs) that is very useful in troubleshooting query performance is sys.dm_exec_requests.&amp;nbsp; The documentation around this DMV, however, is quite lacking in two areas.&lt;br&gt;&lt;br&gt;

&lt;b&gt;percent_complete&lt;/b&gt;

&lt;br&gt;&lt;br&gt;This column shows the "percent of work completed for certain operations, including rollbacks."&amp;nbsp; Okay, great, now could you tell us WHICH certain operations?&amp;nbsp; Through experimenting with commands that I thought could be slow and/or interesting, I came up with this list of commands that *do* report percent_complete:&lt;br&gt;&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;backup / restore&lt;/li&gt;

&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;dbcc checkdb / checktable / etc.&lt;/li&gt;

&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;dbcc shrinkdatabase / shrinkfile&lt;/li&gt;

&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;dbcc indexdefrag &lt;/li&gt;

&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;alter index reorganize&lt;/li&gt;

&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;rollback operations&lt;/li&gt;
&lt;/ul&gt;
And this list of commands which I thought might report percent_complete, but do not:&lt;br&gt;&lt;br&gt;&lt;ul&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;create / drop database&lt;/li&gt;

&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;create / drop index / statistics&lt;/li&gt;

&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;alter index rebuild&lt;/li&gt;

&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;waitfor delay / time&lt;/li&gt;

&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;drop table&lt;/li&gt;

&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;truncate table&lt;/li&gt;

&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;any DML operations whatsoever&lt;/li&gt;
&lt;/ul&gt;
&lt;br&gt;Do you know of anything that should be in either list?&lt;br&gt;&lt;br&gt;


&lt;b&gt;samples&lt;/b&gt;&lt;br&gt;&lt;br&gt;In the &lt;a href="http://technet.microsoft.com/en-us/library/ms177648.aspx" title="sys.dm_exec_requests (2005)" target="_blank"&gt;SQL Server 2005 topic&lt;/a&gt;, there are three samples which are just not very good IMHO.&amp;nbsp; Worse yet, in the &lt;a href="http://technet.microsoft.com/en-us/library/ms177648%28SQL.100%29.aspx" title="sys.dm_exec_requests (2008)" target="_blank"&gt;SQL Server 2008 topic&lt;/a&gt;, the samples have been removed completely.&lt;br&gt;&lt;br&gt;The first one explains how to find the query text for a running batch, and it basically says run the following:&lt;br&gt;&lt;br&gt;
&lt;table bgcolor="#eeeeee" cellpadding="5"&gt;
&lt;tr&gt;
&lt;td style="font-family:lucida console;"&gt;SELECT * FROM sys.dm_exec_requests;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;Then pick the spid you are interested in, copy the value from the sql_handle column, and paste it into this query:&lt;br&gt;&lt;br&gt;
&lt;table bgcolor="#eeeeee" cellpadding="5"&gt;
&lt;tr&gt;
&lt;td style="font-family:lucida console;"&gt;SELECT * FROM sys.dm_exec_sql_text(&amp;lt; copied sql_handle &amp;gt;);&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;Yuck!&amp;nbsp; How about doing this in one step:&lt;br&gt;&lt;br&gt;
&lt;table bgcolor="#eeeeee" cellpadding="5"&gt;
&lt;tr&gt;
&lt;td style="font-family:lucida console;"&gt;SELECT &lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;[spid] = r.session_id,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;[database] = DB_NAME(r.database_id),&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;r.start_time,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;r.[status],&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;r.command,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* add other interesting columns here */&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;[obj] = QUOTENAME(OBJECT_SCHEMA_NAME(t.objectid, t.[dbid]))&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;+ '.' + QUOTENAME(OBJECT_NAME(t.objectid, t.[dbid])),&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;t.[text]&lt;br&gt;FROM&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;sys.dm_exec_requests AS r&lt;br&gt;CROSS APPLY&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;sys.dm_exec_sql_text(r.[sql_handle]) AS t&lt;br&gt;WHERE&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;r.session_id &amp;lt;&amp;gt; @@SPID&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;AND r.session_id &amp;gt; 50&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/*&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;-- optionally:&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;AND r.session_id IN (&amp;lt; list of interesting spids &amp;gt;)&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;*/&lt;br&gt;;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;The second sample does something similar with transactions.&amp;nbsp; Run a select * from dm_exec_requests, take the transaction_id, and copy it into a query against sys.dm_tran_locks.&amp;nbsp; How about:&lt;br&gt;&lt;br&gt;&lt;table bgcolor="#eeeeee" cellpadding="5"&gt;
&lt;tr&gt;
&lt;td style="font-family:lucida console;"&gt;SELECT &lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;[spid] = r.session_id,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;[database] = DB_NAME(r.database_id),&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;r.start_time,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;r.[status],&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;r.command,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;[obj] = QUOTENAME(OBJECT_NAME(t.resource_associated_entity_id, r.database_id)),&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* add other interesting columns here */&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;t.request_mode,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;t.request_type,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;t.request_status&lt;br&gt;FROM&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;sys.dm_exec_requests AS r&lt;br&gt;LEFT OUTER JOIN&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;sys.dm_tran_locks AS t&lt;br&gt;ON&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;r.transaction_id = t.request_owner_id&lt;br&gt;WHERE&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;t.request_owner_type = N'TRANSACTION'&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;AND r.session_id &amp;lt;&amp;gt; @@SPID&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;AND r.session_id &amp;gt; 50&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/*&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;-- optionally:&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;AND r.session_id IN (&amp;lt; list of interesting spids &amp;gt;)&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;*/&lt;br&gt;;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;And finally, the third sample in the 2005 docs shows you how to get all of the sessions that are blocked.&amp;nbsp; How about retrieving both the blocked *and* blocking processes?&amp;nbsp; While this is a much more convoluted example and it involves many more objects, it certainly does a better job of showing off the power of the DMVs:&lt;br&gt;&lt;br&gt;&lt;table bgcolor="#eeeeee" cellpadding="5"&gt;
&lt;tr&gt;
&lt;td style="font-family:lucida console;"&gt;WITH blocking_info AS&lt;br&gt;(&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;SELECT&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;[blocker] = wait.blocking_session_id,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;[waiter] = lock.request_session_id,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;b_handle = br.[sql_handle],&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;w_handle = wr.[sql_handle],&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;[dbid] = lock.resource_database_id,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;duration = wait.wait_duration_ms / 1000,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;lock_type = lock.resource_type,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;lock_mode = block.request_mode&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;FROM&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;sys.dm_tran_locks AS lock&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;INNER JOIN &lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;sys.dm_os_waiting_tasks AS wait&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ON lock.lock_owner_address = wait.resource_address&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;INNER JOIN&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;sys.dm_exec_requests AS br&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ON wait.blocking_session_id = br.session_id&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;INNER JOIN&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;sys.dm_exec_requests AS wr&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ON lock.request_session_id = wr.session_id&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;INNER JOIN &lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;sys.dm_tran_locks AS block&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ON block.request_session_id = br.session_id&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;WHERE&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;block.request_owner_type = 'TRANSACTION'&lt;br&gt;)&lt;br&gt;SELECT&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;[database] = DB_NAME(bi.[dbid]),&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;bi.blocker,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;blocker_command = bt.[text],&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;bi.waiter,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;waiter_command&amp;nbsp; = wt.[text],&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;[duration MM:SS] = RTRIM(bi.duration / 60) + ':' &lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;+ RIGHT('0' + RTRIM(bi.duration % 60), 2),&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;bi.lock_type,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;bi.lock_mode&lt;br&gt;FROM&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;blocking_info AS bi&lt;br&gt;CROSS APPLY&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;sys.dm_exec_sql_text(bi.b_handle) AS bt&lt;br&gt;CROSS APPLY&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;sys.dm_exec_sql_text(bi.w_handle) AS wt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;&lt;b&gt;So, now what?&lt;/b&gt;&lt;p&gt;
Well, I complained about these issues to some extent in the following Connect items:&lt;br&gt;&lt;br&gt;&lt;a href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=354545" title="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=354545" target="_blank"&gt;https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=354545&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=284207" title="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=284207" target="_blank"&gt;https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=284207&lt;/a&gt;&lt;br&gt;&lt;br&gt;The former is fairly new, and I am awaiting some response.&amp;nbsp; The latter was closed as "fixed" but this made no sense -- the topic has actually taken a step backward since I lodged my initial complaint.&amp;nbsp; I re-opened it earlier today.&lt;/p&gt;
&lt;BR&gt;&lt;div class = "shareblock"&gt;&lt;span class = "shareblockTitle"&gt;Share this post:&lt;/span&gt;&lt;span class = "shareblockLink"&gt; &lt;a href = "mailto:?subject=sys.dm_exec_requests&amp;amp;body=Seen on SQLblog.com: %0A%0A%09sys.dm_exec_requests%0A%0Ahttp://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/01/sys-dm-exec-requests.aspx" target="_blank" title = "Email sys.dm_exec_requests"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/01/sys-dm-exec-requests.aspx&amp;amp;title=sys.dm_exec_requests" target="_blank" title = "Submit sys.dm_exec_requests to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/01/sys-dm-exec-requests.aspx&amp;amp;phase=2" target="_blank" title = "Submit sys.dm_exec_requests to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/01/sys-dm-exec-requests.aspx&amp;amp;title=sys.dm_exec_requests" target="_blank" title = "Submit sys.dm_exec_requests to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/01/sys-dm-exec-requests.aspx&amp;amp;title=sys.dm_exec_requests" target="_blank" title = "Submit sys.dm_exec_requests to DotNetKicks"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/01/sys-dm-exec-requests.aspx&amp;amp;title=sys.dm_exec_requests&amp;amp;;top=1" target="_blank" title = "Add sys.dm_exec_requests to Live Bookmarks"&gt;live it!&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://info.sqlblog.com/a.aspx?ZoneID=0&amp;BannerID=12&amp;AdvertiserID=1&amp;CampaignID=12&amp;Task=Get&amp;Mode=TEXT&amp;SiteID=1&amp;RandomNumber=463323" width="1" height="1" border="0"&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=7608" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/DMVs/default.aspx">DMVs</category></item><item><title>OT : Buck Woody talks about the environment</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/24/ot-buck-woody-talks-about-the-environment.aspx</link><pubDate>Tue, 24 Jun 2008 17:29:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7466</guid><dc:creator>AaronBertrand</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/aaron_bertrand/comments/7466.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/aaron_bertrand/commentrss.aspx?PostID=7466</wfw:commentRss><description>&lt;p&gt;Buck makes a quick mention of the "green" efforts at Microsoft &lt;a href="http://blogs.msdn.com/buckwoody/archive/2008/06/24/the-green-green-grass-of-microsoft.aspx" title="http://blogs.msdn.com/buckwoody/archive/2008/06/24/the-green-green-grass-of-microsoft.aspx" target="_blank"&gt;in his blog&lt;/a&gt;, and points us to the &lt;a href="http://www.microsoft.com/environment/" title="http://www.microsoft.com/environment/" target="_blank"&gt;Environment site&lt;/a&gt; that Microsoft has created to show off what they are doing for a cause that is important to all of us.&amp;nbsp; There are several tidbits in here that can help you do your part, as well.&amp;nbsp; Please pass the word along.&lt;br&gt;&lt;/p&gt;
&lt;BR&gt;&lt;div class = "shareblock"&gt;&lt;span class = "shareblockTitle"&gt;Share this post:&lt;/span&gt;&lt;span class = "shareblockLink"&gt; &lt;a href = "mailto:?subject=OT : Buck Woody talks about the environment&amp;amp;body=Seen on SQLblog.com: %0A%0A%09OT : Buck Woody talks about the environment%0A%0Ahttp://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/24/ot-buck-woody-talks-about-the-environment.aspx" target="_blank" title = "Email OT : Buck Woody talks about the environment"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/24/ot-buck-woody-talks-about-the-environment.aspx&amp;amp;title=OT+%3a+Buck+Woody+talks+about+the+environment" target="_blank" title = "Submit OT : Buck Woody talks about the environment to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/24/ot-buck-woody-talks-about-the-environment.aspx&amp;amp;phase=2" target="_blank" title = "Submit OT : Buck Woody talks about the environment to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/24/ot-buck-woody-talks-about-the-environment.aspx&amp;amp;title=OT+%3a+Buck+Woody+talks+about+the+environment" target="_blank" title = "Submit OT : Buck Woody talks about the environment to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/24/ot-buck-woody-talks-about-the-environment.aspx&amp;amp;title=OT+%3a+Buck+Woody+talks+about+the+environment" target="_blank" title = "Submit OT : Buck Woody talks about the environment to DotNetKicks"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/24/ot-buck-woody-talks-about-the-environment.aspx&amp;amp;title=OT+%3a+Buck+Woody+talks+about+the+environment&amp;amp;;top=1" target="_blank" title = "Add OT : Buck Woody talks about the environment to Live Bookmarks"&gt;live it!&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://info.sqlblog.com/a.aspx?ZoneID=0&amp;BannerID=12&amp;AdvertiserID=1&amp;CampaignID=12&amp;Task=Get&amp;Mode=TEXT&amp;SiteID=1&amp;RandomNumber=463323" width="1" height="1" border="0"&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=7466" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/green/default.aspx">green</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/environment/default.aspx">environment</category></item><item><title>My biggest beef with RC0 so far</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/06/my-biggest-beef-with-rc0-so-far.aspx</link><pubDate>Fri, 06 Jun 2008 20:55:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7173</guid><dc:creator>AaronBertrand</dc:creator><slash:comments>4</slash:comments><comments>http://sqlblog.com/blogs/aaron_bertrand/comments/7173.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/aaron_bertrand/commentrss.aspx?PostID=7173</wfw:commentRss><description>&lt;p&gt;As Andrew Fryer pointed out earlier today &lt;a href="http://blogs.technet.com/andrew/archive/2008/06/06/sql-server-2008-rc0.aspx" title="http://blogs.technet.com/andrew/archive/2008/06/06/sql-server-2008-rc0.aspx" target="_blank"&gt;on his blog&lt;/a&gt;, RC0 for SQL Server 2008 has been released to MSDN and TechNet subscribers.&amp;nbsp; What is RC0?&amp;nbsp; It may be the last public push we see before the product RTMs later this year.&amp;nbsp; It is feature complete, and from this point forward, only major show stoppers will likely be addressed before then.&lt;br&gt;&lt;/p&gt;&lt;p&gt;I am writing to plead for your votes on a very important issue that came up for me using the new Activity Monitor, which is a show stopper for me.&amp;nbsp; There is a great new Activity Monitor which has a lot of new features, such as launching Profiler directly from a SPID list, and launching a showplan from a list of "Recent Expensive Queries."&amp;nbsp; This latter feature is completely broken for me, when connecting to a SQL Server 2005 instance.&amp;nbsp; I get an unhandled exception:&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.aaronbertrand.com/voodoo/unhandled_exception_a.gif" title="Unhandled Exception" alt="Unhandled Exception" border="1" height="726" width="547"&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;I am hoping that you find this an important issue as I do... most notably because we will likely be upgrading our workstation client tools long before we upgrade all of the servers we manage.&lt;/p&gt;&lt;p&gt;So, I am asking for your votes in the following Connect item:&lt;/p&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=349494" title="Connect Item # 349494" target="_blank"&gt;http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=349494&lt;/a&gt;&lt;br&gt;&lt;/p&gt;
&lt;BR&gt;&lt;div class = "shareblock"&gt;&lt;span class = "shareblockTitle"&gt;Share this post:&lt;/span&gt;&lt;span class = "shareblockLink"&gt; &lt;a href = "mailto:?subject=My biggest beef with RC0 so far&amp;amp;body=Seen on SQLblog.com: %0A%0A%09My biggest beef with RC0 so far%0A%0Ahttp://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/06/my-biggest-beef-with-rc0-so-far.aspx" target="_blank" title = "Email My biggest beef with RC0 so far"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/06/my-biggest-beef-with-rc0-so-far.aspx&amp;amp;title=My+biggest+beef+with+RC0+so+far" target="_blank" title = "Submit My biggest beef with RC0 so far to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/06/my-biggest-beef-with-rc0-so-far.aspx&amp;amp;phase=2" target="_blank" title = "Submit My biggest beef with RC0 so far to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/06/my-biggest-beef-with-rc0-so-far.aspx&amp;amp;title=My+biggest+beef+with+RC0+so+far" target="_blank" title = "Submit My biggest beef with RC0 so far to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/06/my-biggest-beef-with-rc0-so-far.aspx&amp;amp;title=My+biggest+beef+with+RC0+so+far" target="_blank" title = "Submit My biggest beef with RC0 so far to DotNetKicks"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/06/my-biggest-beef-with-rc0-so-far.aspx&amp;amp;title=My+biggest+beef+with+RC0+so+far&amp;amp;;top=1" target="_blank" title = "Add My biggest beef with RC0 so far to Live Bookmarks"&gt;live it!&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://info.sqlblog.com/a.aspx?ZoneID=0&amp;BannerID=12&amp;AdvertiserID=1&amp;CampaignID=12&amp;Task=Get&amp;Mode=TEXT&amp;SiteID=1&amp;RandomNumber=463323" width="1" height="1" border="0"&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=7173" width="1" height="1"&gt;</description></item><item><title>SQL Server has a new logo</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/03/sql-server-has-a-new-logo.aspx</link><pubDate>Tue, 03 Jun 2008 21:51:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7124</guid><dc:creator>AaronBertrand</dc:creator><slash:comments>6</slash:comments><comments>http://sqlblog.com/blogs/aaron_bertrand/comments/7124.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/aaron_bertrand/commentrss.aspx?PostID=7124</wfw:commentRss><description>
&lt;p&gt;SQL Server's new logo has been published:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://i.microsoft.com/global/sqlserver/2008/en/us/PublishingImages/logo-header-sql08-dg.gif" title="SQL Server 2008" alt="SQL Server 2008" width="363" border="0" height="75"&gt;&lt;br&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Courtesy of &lt;a href="http://blogs.msdn.com/wesleyb/archive/2008/06/03/sql-server-logo.aspx" title="http://blogs.msdn.com/wesleyb/archive/2008/06/03/sql-server-logo.aspx" target="_blank"&gt;Wesley&lt;/a&gt;.&amp;nbsp; And I have taken a screen shot of the new splash screen for Management Studio:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.aaronbertrand.com/voodoo/RC0_splash_screen_a.gif" title="SSMS RC0 splash screen" alt="SSMS RC0 splash screen" width="476" align="top" border="0" height="310" hspace="0"&gt;&amp;nbsp;&lt;br&gt;&lt;/p&gt;
&lt;BR&gt;&lt;div class = "shareblock"&gt;&lt;span class = "shareblockTitle"&gt;Share this post:&lt;/span&gt;&lt;span class = "shareblockLink"&gt; &lt;a href = "mailto:?subject=SQL Server has a new logo&amp;amp;body=Seen on SQLblog.com: %0A%0A%09SQL Server has a new logo%0A%0Ahttp://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/03/sql-server-has-a-new-logo.aspx" target="_blank" title = "Email SQL Server has a new logo"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/03/sql-server-has-a-new-logo.aspx&amp;amp;title=SQL+Server+has+a+new+logo" target="_blank" title = "Submit SQL Server has a new logo to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/03/sql-server-has-a-new-logo.aspx&amp;amp;phase=2" target="_blank" title = "Submit SQL Server has a new logo to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/03/sql-server-has-a-new-logo.aspx&amp;amp;title=SQL+Server+has+a+new+logo" target="_blank" title = "Submit SQL Server has a new logo to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/03/sql-server-has-a-new-logo.aspx&amp;amp;title=SQL+Server+has+a+new+logo" target="_blank" title = "Submit SQL Server has a new logo to DotNetKicks"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/06/03/sql-server-has-a-new-logo.aspx&amp;amp;title=SQL+Server+has+a+new+logo&amp;amp;;top=1" target="_blank" title = "Add SQL Server has a new logo to Live Bookmarks"&gt;live it!&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://info.sqlblog.com/a.aspx?ZoneID=0&amp;BannerID=12&amp;AdvertiserID=1&amp;CampaignID=12&amp;Task=Get&amp;Mode=TEXT&amp;SiteID=1&amp;RandomNumber=463323" width="1" height="1" border="0"&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=7124" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/katmai/default.aspx">katmai</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category></item><item><title>More on the recent rash of SQL injection attacks (update 6/3)</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/31/more-on-the-recent-rash-of-sql-injection-attacks.aspx</link><pubDate>Sat, 31 May 2008 03:42:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7088</guid><dc:creator>AaronBertrand</dc:creator><slash:comments>4</slash:comments><comments>http://sqlblog.com/blogs/aaron_bertrand/comments/7088.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/aaron_bertrand/commentrss.aspx?PostID=7088</wfw:commentRss><description>&lt;p&gt;Fellow MVP Steve Kass and Microsoft's Buck Woody have some links and advice about preventing SQL injection attacks not only from affecting your data but also from affecting your users.&amp;nbsp; You can see the information here:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://stevekass.com/blog/2008/05/31/read-this-if-you-serve-up-web-pages-from-sql-data/" title="http://stevekass.com/blog/2008/05/31/read-this-if-you-serve-up-web-pages-from-sql-data/" target="_blank"&gt;http://stevekass.com/blog/2008/05/31/read-this-if-you-serve-up-web-pages-from-sql-data/&lt;/a&gt; &lt;br&gt;&lt;/p&gt;

&lt;p&gt;And here:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/buckwoody/archive/2008/05/30/sql-injection-attacks.aspx" title="http://blogs.msdn.com/buckwoody/archive/2008/05/30/sql-injection-attacks.aspx" target="_blank"&gt;http://blogs.msdn.com/buckwoody/archive/2008/05/30/sql-injection-attacks.aspx&lt;/a&gt; &lt;br&gt;&lt;/p&gt;

&lt;p&gt;I agree with Steve wholeheartedly here.&amp;nbsp; Having your data compromised is one thing... you learn from it, you fix it, you move on.&amp;nbsp; But aiding in the distribution of whatever payload is in all of these &amp;lt;script&amp;gt; files that you are unwittingly unleashing on your viewers is something you should try to avoid at all costs.&amp;nbsp; Unless you are storing your actual HTML content and layout in the database (which is usually a no-no), there is no reason you should ever blindly throw data from the database into a web page without first making sure that all HTML tags (like &amp;lt;BR&amp;gt;) are replaced with characters that make them non-rendering (like &amp;amp;lt;BR&amp;amp;gt;).&lt;/p&gt;

&lt;p&gt;Another excellent resource is the following article:&lt;br&gt;&lt;br&gt;&lt;a href="http://blogs.technet.com/swi/archive/2008/05/29/sql-injection-attack.aspx" title="http://blogs.technet.com/swi/archive/2008/05/29/sql-injection-attack.aspx" target="_blank"&gt;http://blogs.technet.com/swi/archive/2008/05/29/sql-injection-attack.aspx&lt;/a&gt;&lt;br&gt;&lt;/p&gt;
&lt;BR&gt;&lt;div class = "shareblock"&gt;&lt;span class = "shareblockTitle"&gt;Share this post:&lt;/span&gt;&lt;span class = "shareblockLink"&gt; &lt;a href = "mailto:?subject=More on the recent rash of SQL injection attacks (update 6/3)&amp;amp;body=Seen on SQLblog.com: %0A%0A%09More on the recent rash of SQL injection attacks (update 6/3)%0A%0Ahttp://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/31/more-on-the-recent-rash-of-sql-injection-attacks.aspx" target="_blank" title = "Email More on the recent rash of SQL injection attacks (update 6/3)"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/31/more-on-the-recent-rash-of-sql-injection-attacks.aspx&amp;amp;title=More+on+the+recent+rash+of+SQL+injection+attacks+(update+6%2f3)" target="_blank" title = "Submit More on the recent rash of SQL injection attacks (update 6/3) to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/31/more-on-the-recent-rash-of-sql-injection-attacks.aspx&amp;amp;phase=2" target="_blank" title = "Submit More on the recent rash of SQL injection attacks (update 6/3) to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/31/more-on-the-recent-rash-of-sql-injection-attacks.aspx&amp;amp;title=More+on+the+recent+rash+of+SQL+injection+attacks+(update+6%2f3)" target="_blank" title = "Submit More on the recent rash of SQL injection attacks (update 6/3) to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/31/more-on-the-recent-rash-of-sql-injection-attacks.aspx&amp;amp;title=More+on+the+recent+rash+of+SQL+injection+attacks+(update+6%2f3)" target="_blank" title = "Submit More on the recent rash of SQL injection attacks (update 6/3) to DotNetKicks"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/31/more-on-the-recent-rash-of-sql-injection-attacks.aspx&amp;amp;title=More+on+the+recent+rash+of+SQL+injection+attacks+(update+6%2f3)&amp;amp;;top=1" target="_blank" title = "Add More on the recent rash of SQL injection attacks (update 6/3) to Live Bookmarks"&gt;live it!&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://info.sqlblog.com/a.aspx?ZoneID=0&amp;BannerID=12&amp;AdvertiserID=1&amp;CampaignID=12&amp;Task=Get&amp;Mode=TEXT&amp;SiteID=1&amp;RandomNumber=463323" width="1" height="1" border="0"&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=7088" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/sql+injection/default.aspx">sql injection</category></item><item><title>Are you (or is your team) nervous about SQL Server 2008?</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/20/are-you-or-your-team-nervous-about-sql-server-2008.aspx</link><pubDate>Tue, 20 May 2008 21:21:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6896</guid><dc:creator>AaronBertrand</dc:creator><slash:comments>9</slash:comments><comments>http://sqlblog.com/blogs/aaron_bertrand/comments/6896.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/aaron_bertrand/commentrss.aspx?PostID=6896</wfw:commentRss><description>&lt;p&gt;As you may know, I have been heavily involved in testing a lot of the new features in SQL Server 2008, and am likely as excited as anybody about its release.&amp;nbsp; Since I work at a fairly progressive company, I spoke with two of my superiors today - independently - and I was surprised at the results.&amp;nbsp; My proposal was, for the project that we are currently working on, that we hit the ground running by deploying SQL Server 2008 when we are ready to launch.&amp;nbsp; Based, of course, on successful testing and adequate performance of RC0 (when we get it) in the meantime, and that the product ships on time.&lt;/p&gt;&lt;p&gt;My immediate superior was all for it.&amp;nbsp; Having attended one of my presentations on the new features, he knew about some of the benefits we would enjoy pretty much right out of the box -- page/row/backup compression, filtered indexes, date columns, change data capture, the list goes on.&amp;nbsp; And he is all for deploying the next CTP to our QA environment for serious functionality / load testing and analysis, with the intention of being on the "early adopter" side of the curve when the product ships.&lt;br&gt;&lt;/p&gt;&lt;p&gt;His boss, however, is a lot more cautious.&amp;nbsp; Not only is he uninterested in deploying SQL Server 2008 right away; he is not even interested in looking at it until SP1 is out, and tested, and has about a month of serious market penetration.&amp;nbsp; Which, by rough calculations, based on the TPC benchmark publication date and the new servicing model, should be sometime in February or March of next year.&lt;/p&gt;&lt;p&gt;All of this stemming from the long-standing tradition of never installing a dot-oh release of a Microsoft product.&amp;nbsp; Personally, I found the RTM of SQL Server 2005 a hell of a lot more stable than SP2. (And SP1, IIRC, did little in terms of "fixing" anything except that they finished the database mirroring functionality.)&amp;nbsp; Service packs in SQL Server 2000 don't exactly give us great confidence, either. YMMV.&lt;br&gt;&lt;/p&gt;&lt;p&gt;What I was hoping for was a balanced response, somewhere in the middle.&amp;nbsp; Like, okay, we won't deploy the day it is out, but we will perform all the necessary tests, including upgrade scenarios, and consider it within a few months of release.&amp;nbsp; For me, 9 months is a LONG time to wait (and no, it has nothing to do with having children :-)).&amp;nbsp; But are you facing similar superstition?&amp;nbsp; Do you feel that way yourself?&amp;nbsp; I am curious how others are progressing in the "let's upgrade" battle.&amp;nbsp; Tell me your stories!&amp;nbsp; Do you align with my boss' boss?&amp;nbsp; Or do you have any suggestions for changing his mind?&lt;br&gt;&lt;/p&gt;
&lt;BR&gt;&lt;div class = "shareblock"&gt;&lt;span class = "shareblockTitle"&gt;Share this post:&lt;/span&gt;&lt;span class = "shareblockLink"&gt; &lt;a href = "mailto:?subject=Are you (or is your team) nervous about SQL Server 2008?&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Are you (or is your team) nervous about SQL Server 2008?%0A%0Ahttp://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/20/are-you-or-your-team-nervous-about-sql-server-2008.aspx" target="_blank" title = "Email Are you (or is your team) nervous about SQL Server 2008?"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/20/are-you-or-your-team-nervous-about-sql-server-2008.aspx&amp;amp;title=Are+you+(or+is+your+team)+nervous+about+SQL+Server+2008%3f" target="_blank" title = "Submit Are you (or is your team) nervous about SQL Server 2008? to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/20/are-you-or-your-team-nervous-about-sql-server-2008.aspx&amp;amp;phase=2" target="_blank" title = "Submit Are you (or is your team) nervous about SQL Server 2008? to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/20/are-you-or-your-team-nervous-about-sql-server-2008.aspx&amp;amp;title=Are+you+(or+is+your+team)+nervous+about+SQL+Server+2008%3f" target="_blank" title = "Submit Are you (or is your team) nervous about SQL Server 2008? to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/20/are-you-or-your-team-nervous-about-sql-server-2008.aspx&amp;amp;title=Are+you+(or+is+your+team)+nervous+about+SQL+Server+2008%3f" target="_blank" title = "Submit Are you (or is your team) nervous about SQL Server 2008? to DotNetKicks"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/20/are-you-or-your-team-nervous-about-sql-server-2008.aspx&amp;amp;title=Are+you+(or+is+your+team)+nervous+about+SQL+Server+2008%3f&amp;amp;;top=1" target="_blank" title = "Add Are you (or is your team) nervous about SQL Server 2008? to Live Bookmarks"&gt;live it!&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://info.sqlblog.com/a.aspx?ZoneID=0&amp;BannerID=12&amp;AdvertiserID=1&amp;CampaignID=12&amp;Task=Get&amp;Mode=TEXT&amp;SiteID=1&amp;RandomNumber=463323" width="1" height="1" border="0"&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=6896" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category></item><item><title>Do you want IntelliSense to support SQL Server 2005?</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/19/do-you-want-intellisense-to-support-sql-server-2005.aspx</link><pubDate>Mon, 19 May 2008 22:59:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6868</guid><dc:creator>AaronBertrand</dc:creator><slash:comments>14</slash:comments><comments>http://sqlblog.com/blogs/aaron_bertrand/comments/6868.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/aaron_bertrand/commentrss.aspx?PostID=6868</wfw:commentRss><description>&lt;p&gt;Currently, the plans for IntelliSense are to support SQL Server 2008 *ONLY*... since it works against SQL Server 2005 in the February CTP, I was very surprised to learn that it is being dropped by RTM (and possibly by RC0).&amp;nbsp; This is mainly because of the time frame of the release and the difficulty of catering to multiple dialects (sometimes there are going to be false positives, and there are even possibilities that it will miss obvious issues).&amp;nbsp; You can read more about this issue at &lt;a href="http://blog.magenic.com/blogs/whitneyw/archive/2008/05/04/Backward-compatibility-for-IntelliSense-please.aspx" title="http://blog.magenic.com/blogs/whitneyw/archive/2008/05/04/Backward-compatibility-for-IntelliSense-please.aspx" target="_blank"&gt;The W Blog&lt;/a&gt;.&lt;br&gt;&lt;/p&gt;&lt;p&gt;Being that IntelliSense isn't even going to be complete when SQL Server 2008 ships (mostly just supporting SELECT operations), I could live with a disclaimer that says, when you are working against a downlevel version, it is not always going to be 100% accurate.&amp;nbsp; Could you?&amp;nbsp; If so, I urge you to cast your vote on Connect (at publish time, only 11 people have voted):&lt;br&gt;&lt;br&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=341872" title="http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=341872" target="_blank"&gt;http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=341872&lt;/a&gt;&lt;br&gt;&lt;/p&gt;
&lt;BR&gt;&lt;div class = "shareblock"&gt;&lt;span class = "shareblockTitle"&gt;Share this post:&lt;/span&gt;&lt;span class = "shareblockLink"&gt; &lt;a href = "mailto:?subject=Do you want IntelliSense to support SQL Server 2005?&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Do you want IntelliSense to support SQL Server 2005?%0A%0Ahttp://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/19/do-you-want-intellisense-to-support-sql-server-2005.aspx" target="_blank" title = "Email Do you want IntelliSense to support SQL Server 2005?"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/19/do-you-want-intellisense-to-support-sql-server-2005.aspx&amp;amp;title=Do+you+want+IntelliSense+to+support+SQL+Server+2005%3f" target="_blank" title = "Submit Do you want IntelliSense to support SQL Server 2005? to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/19/do-you-want-intellisense-to-support-sql-server-2005.aspx&amp;amp;phase=2" target="_blank" title = "Submit Do you want IntelliSense to support SQL Server 2005? to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/19/do-you-want-intellisense-to-support-sql-server-2005.aspx&amp;amp;title=Do+you+want+IntelliSense+to+support+SQL+Server+2005%3f" target="_blank" title = "Submit Do you want IntelliSense to support SQL Server 2005? to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/19/do-you-want-intellisense-to-support-sql-server-2005.aspx&amp;amp;title=Do+you+want+IntelliSense+to+support+SQL+Server+2005%3f" target="_blank" title = "Submit Do you want IntelliSense to support SQL Server 2005? to DotNetKicks"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/19/do-you-want-intellisense-to-support-sql-server-2005.aspx&amp;amp;title=Do+you+want+IntelliSense+to+support+SQL+Server+2005%3f&amp;amp;;top=1" target="_blank" title = "Add Do you want IntelliSense to support SQL Server 2005? to Live Bookmarks"&gt;live it!&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://info.sqlblog.com/a.aspx?ZoneID=0&amp;BannerID=12&amp;AdvertiserID=1&amp;CampaignID=12&amp;Task=Get&amp;Mode=TEXT&amp;SiteID=1&amp;RandomNumber=463323" width="1" height="1" border="0"&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=6868" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/backward+compatibility/default.aspx">backward compatibility</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/intellisense/default.aspx">intellisense</category></item><item><title>When was my database / table last accessed?</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/06/when-was-my-database-table-last-accessed.aspx</link><pubDate>Tue, 06 May 2008 05:14:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6639</guid><dc:creator>AaronBertrand</dc:creator><slash:comments>8</slash:comments><comments>http://sqlblog.com/blogs/aaron_bertrand/comments/6639.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/aaron_bertrand/commentrss.aspx?PostID=6639</wfw:commentRss><description>A frequently asked question that surfaced again today is, "how do I see when my data has been accessed last?"&amp;nbsp; SQL Server does not track this information for you.&amp;nbsp; SELECT triggers still do not exist.&amp;nbsp; Third party tools are expensive and can incur unexpected overhead.&amp;nbsp; And people continue to be reluctant or unable to constrain table access via stored procedures, which could otherwise perform simple logging.&amp;nbsp; Even in cases where all table access is via stored procedures, it can be quite cumbersome to modify all the stored procedures to perform logging.&lt;br&gt;&lt;p&gt;SQL Server 2008 will offer Server Auditing for all actions, and this can be logged to a file, or to the Windows Application or Security Log.&amp;nbsp; You can do something as narrow as record when a specific login queries AdventureWorks.Person.Address.City, and as wide as recording information about every query against every database on the entire instance.&amp;nbsp; Here is a quick sample that audits all select queries against Person.Address in the AdventureWorks sample database:&lt;br&gt;
&lt;/p&gt;
&lt;table bgcolor="#eeeeee" cellpadding="5"&gt;
&lt;tr&gt;
&lt;td style="font-family:lucida console;"&gt;USE master;&lt;br&gt;GO&lt;br&gt;CREATE SERVER AUDIT Test_Server_Audit&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TO FILE ( FILEPATH = 'C:\Audits\' );&lt;br&gt;GO&lt;br&gt;ALTER SERVER AUDIT Test_Server_Audit&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WITH (STATE = ON);&lt;br&gt;GO&lt;br&gt;&lt;br&gt;USE AdventureWorks;&lt;br&gt;GO&lt;br&gt;CREATE DATABASE AUDIT SPECIFICATION Test_Database_Audit&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FOR SERVER AUDIT Test_Server_Audit&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADD (SELECT ON Person.Address BY PUBLIC)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WITH (STATE = ON);&lt;br&gt;GO&lt;br&gt;&lt;br&gt;SELECT *&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM Person.Address;&lt;br&gt;GO&lt;br&gt;&lt;br&gt;SELECT * &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM fn_get_audit_file('C:\Audits\*', NULL, NULL);&lt;br&gt;GO&lt;br&gt;&lt;br&gt;USE AdventureWorks;&lt;br&gt;GO&lt;br&gt;ALTER DATABASE AUDIT SPECIFICATION Test_Database_Audit&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WITH (STATE = OFF);&lt;br&gt;GO&lt;br&gt;DROP DATABASE AUDIT SPECIFICATION Test_Database_Audit;&lt;br&gt;GO&lt;br&gt;USE master;&lt;br&gt;GO&lt;br&gt;ALTER SERVER AUDIT Test_Server_Audit&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WITH (STATE = OFF);&lt;br&gt;GO&lt;br&gt;DROP SERVER AUDIT Test_Server_Audit;&lt;br&gt;GO&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;For those of us who don't want to wait for SQL Server 2008 and cannot use stored procedures to log select activity, there is another answer: the DMV sys.dm_db_index_usage_stats, introduced in SQL Server 2005.&amp;nbsp; By showing the last read and write to a table, this DMV allows us to answer the questions we couldn't before:&lt;br&gt;

&lt;ul&gt;
&lt;li&gt;when was database x accessed last?&lt;/li&gt;

&lt;li&gt;when was table y accessed last?&lt;/li&gt;
&lt;/ul&gt;
We can answer the question about access to a database simply by aggregating the data in the DMV to the database level:&lt;br&gt;&lt;br&gt;
&lt;table bgcolor="#eeeeee" cellpadding="5"&gt;
&lt;tr&gt;
&lt;td style="font-family:lucida console;"&gt;USE AdventureWorks;&lt;br&gt;GO&lt;br&gt;&lt;br&gt;SET ANSI_WARNINGS OFF;&lt;br&gt;SET NOCOUNT ON;&lt;br&gt;GO&lt;br&gt;&lt;br&gt;WITH agg AS&lt;br&gt;(&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; last_user_seek,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; last_user_scan,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; last_user_lookup,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; last_user_update&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sys.dm_db_index_usage_stats&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; database_id = DB_ID()&lt;br&gt;)&lt;br&gt;SELECT&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; last_read = MAX(last_read),&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; last_write = MAX(last_write)&lt;br&gt;FROM&lt;br&gt;(&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT last_user_seek, NULL FROM agg&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UNION ALL&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT last_user_scan, NULL FROM agg&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UNION ALL&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT last_user_lookup, NULL FROM agg&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UNION ALL&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT NULL, last_user_update FROM agg&lt;br&gt;) AS x (last_read, last_write);&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;br&gt;Switching focus to each table is accomplished by adding the object name to the GROUP BY (and as Jerry pointed out, this will require SP2 to use OBJECT_SCHEMA_NAME(), otherwise you can join against sys.tables and sys.schemas):&lt;br&gt;&lt;br&gt;
&lt;table bgcolor="#eeeeee" cellpadding="5"&gt;
&lt;tr&gt;
&lt;td style="font-family:lucida console;"&gt;
&lt;p&gt;USE AdventureWorks;&lt;br&gt;GO&lt;br&gt;&lt;br&gt;SET ANSI_WARNINGS OFF;&lt;br&gt;SET NOCOUNT ON;&lt;br&gt;GO&lt;br&gt;&lt;br&gt;WITH agg AS&lt;br&gt;(&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [object_id],&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; last_user_seek,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; last_user_scan,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; last_user_lookup,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; last_user_update&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sys.dm_db_index_usage_stats&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; database_id = DB_ID()&lt;br&gt;)&lt;br&gt;SELECT&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Schema] = OBJECT_SCHEMA_NAME([object_id]),&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Table_Or_View] = OBJECT_NAME([object_id]),&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; last_read = MAX(last_read),&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; last_write = MAX(last_write)&lt;br&gt;FROM&lt;br&gt;(&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT [object_id], last_user_seek, NULL FROM agg&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UNION ALL&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT [object_id], last_user_scan, NULL FROM agg&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UNION ALL&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT [object_id], last_user_lookup, NULL FROM agg&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UNION ALL&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT [object_id], NULL, last_user_update FROM agg&lt;br&gt;) AS x ([object_id], last_read, last_write)&lt;br&gt;GROUP BY&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OBJECT_SCHEMA_NAME([object_id]),&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OBJECT_NAME([object_id])&lt;br&gt;ORDER BY 1,2;&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;One word of note is that sometimes an UPDATE can look like a simultaneous read and write.&amp;nbsp; For example:&lt;br&gt;&lt;br&gt;
&lt;table bgcolor="#eeeeee" cellpadding="5"&gt;
&lt;tr&gt;
&lt;td style="font-family:lucida console;"&gt;USE AdventureWorks;&lt;br&gt;GO&lt;br&gt;UPDATE Person.Address SET City = City + '';&lt;br&gt;GO&lt;br&gt;SELECT *&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM sys.dm_db_index_usage_stats&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE database_id = DB_ID() &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND index_id = 1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND [object_id] = OBJECT_ID('Person.Address');&lt;br&gt;GO&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;See that for index_id 1, last_user_scan and last_user_update are identical and fairly recent.&lt;br&gt;&lt;br&gt;Another note is that unless a view is indexed, you cannot reliably track access to a view -- instead the references to the underlying tables are updated in the DMV.&lt;br&gt;&lt;br&gt;&lt;b&gt;UPDATE&lt;/b&gt; - Mike C# and dave ballantyne brought up a great point that applies to all DMVs: the values do not survive a SQL Server restart, or detach/attach, or even Auto-Close.  So, if you restart your server and then want to see when something was last accessed, all objects will either be NULL or very recent.  One way to work around this is to create a SQL Server Agent job that polls the DMV periodically, and stores a snapshot of the data.  This way you can have a running history of "last access" and maybe roll it up once per day (or whatever granularity is suitable).&lt;br&gt;&lt;br&gt;Even when SQL Server 2008 is released, auditing of some kind will be required if you want more information, such as a history of who ran which queries.&amp;nbsp; And if you are looking for more details about information that has been added, updated or deleted, you are going to want to look into the Change Tracking and/or Change Data Capture features.&amp;nbsp; But in the meantime, this DMV provides a quicker and much lighter-weight approach to at least determining when your data was accessed last.
&lt;BR&gt;&lt;div class = "shareblock"&gt;&lt;span class = "shareblockTitle"&gt;Share this post:&lt;/span&gt;&lt;span class = "shareblockLink"&gt; &lt;a href = "mailto:?subject=When was my database / table last accessed?&amp;amp;body=Seen on SQLblog.com: %0A%0A%09When was my database / table last accessed?%0A%0Ahttp://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/06/when-was-my-database-table-last-accessed.aspx" target="_blank" title = "Email When was my database / table last accessed?"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/06/when-was-my-database-table-last-accessed.aspx&amp;amp;title=When+was+my+database+%2f+table+last+accessed%3f" target="_blank" title = "Submit When was my database / table last accessed? to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/06/when-was-my-database-table-last-accessed.aspx&amp;amp;phase=2" target="_blank" title = "Submit When was my database / table last accessed? to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/06/when-was-my-database-table-last-accessed.aspx&amp;amp;title=When+was+my+database+%2f+table+last+accessed%3f" target="_blank" title = "Submit When was my database / table last accessed? to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/06/when-was-my-database-table-last-accessed.aspx&amp;amp;title=When+was+my+database+%2f+table+last+accessed%3f" target="_blank" title = "Submit When was my database / table last accessed? to DotNetKicks"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/06/when-was-my-database-table-last-accessed.aspx&amp;amp;title=When+was+my+database+%2f+table+last+accessed%3f&amp;amp;;top=1" target="_blank" title = "Add When was my database / table last accessed? to Live Bookmarks"&gt;live it!&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://info.sqlblog.com/a.aspx?ZoneID=0&amp;BannerID=12&amp;AdvertiserID=1&amp;CampaignID=12&amp;Task=Get&amp;Mode=TEXT&amp;SiteID=1&amp;RandomNumber=463323" width="1" height="1" border="0"&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=6639" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/DMVs/default.aspx">DMVs</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/dynamic+management+views/default.aspx">dynamic management views</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/SQL+Server+2005/default.aspx">SQL Server 2005</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/auditing/default.aspx">auditing</category></item><item><title>Performance / Storage Comparisons : MONEY vs. DECIMAL</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/27/performance-storage-comparisons-money-vs-decimal.aspx</link><pubDate>Sun, 27 Apr 2008 22:12:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6473</guid><dc:creator>AaronBertrand</dc:creator><slash:comments>12</slash:comments><comments>http://sqlblog.com/blogs/aaron_bertrand/comments/6473.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/aaron_bertrand/commentrss.aspx?PostID=6473</wfw:commentRss><description>&lt;p&gt;As you may already know, I am not a big fan of the MONEY data type, because of its inflexibility, accuracy problems, and the expectations the name of the type evokes in new users.&amp;nbsp; If I had my way, MONEY would become a synonym for DECIMAL in SQL Server 2008 (allowing for specific precision and scale), and be removed in the following version.&amp;nbsp; Of course there are people out there that either don't feel as strongly as I do, or feel the opposite -- that MONEY should be here to stay.&lt;br&gt;&lt;/p&gt;

&lt;p&gt;After a recent discussion about the pros and cons of using MONEY vs
DECIMAL for storing currency (and even non-currency) data, curiosity
got the better of me.&amp;nbsp; One of the arguments for the MONEY data type was performance.&amp;nbsp; No supporting data was provided, of course.&amp;nbsp; So I decided to conduct some tests myself.&amp;nbsp; I wanted to measure how MONEY compared to DECIMAL data types both in their original implementations and using new technologies available in SQL Server 2005 (VARDECIMAL storage format) and SQL Server 2008 (page and row compression).&lt;br&gt;&lt;/p&gt;

&lt;p&gt;The person arguing for MONEY showed the space used by MONEY compared to the same information stored in a DECIMAL(20,4) column.&amp;nbsp; Not all that surprisingly, the latter was slightly larger.&amp;nbsp; But is that the whole story?&amp;nbsp; No, for two reasons.&amp;nbsp; One is that the *performance* of these choices was not compared, and the other is that DECIMAL(20,4) is not a very realistic requirement for storing currency data.&amp;nbsp; Unless you are storing the pricing information for luxury yachts or aircraft carriers, in which case you can probably drop the decimal places altogether and use INT or BIGINT.&amp;nbsp; For the rest of us, a better choice would be DECIMAL(8,2) or DECIMAL(10,2).&lt;br&gt;&lt;/p&gt;

&lt;p&gt;I created 11 databases, each with a single table containing a single column:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.aaronbertrand.com/decimal_money/md_1.gif" border="1" hspace="10"&gt;&amp;nbsp;&lt;/p&gt;

&lt;ul&gt;&lt;/ul&gt;

&lt;p&gt;Keeping these tables in separate databases allowed for isolation of several factors and measurements, including database level settings, log growth, data file size and even backup time.&lt;/p&gt;

&lt;p&gt;Next, I populated the table in each database with approximately 390,000 rows of varying length decimal data (based on calculations against object_id from a triple cross join of sys.objects on itself), and measured the insert times and storage requirements.&amp;nbsp; Here is how they stacked up:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="http://www.aaronbertrand.com/decimal_money/md_2.gif" border="1" height="248" hspace="10" width="374"&gt;&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Then I performed an update that affected all rows, making sure that roughly 20% of the rows would have a significant change in significant digits (e.g. by adding 1,000,000).&amp;nbsp; Here is the performance comparison, as well as how the data and log were affected:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.aaronbertrand.com/decimal_money/md_3.gif" border="1" height="248" hspace="10" width="553"&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Next I compared the time and cost of performing a SELECT COUNT(*) with a WHERE clause against the column:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.aaronbertrand.com/decimal_money/md_4.gif" border="1" height="248" hspace="10" width="553"&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;And finally, I performed native and compressed backups of each database, comparing execution time and output size:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.aaronbertrand.com/decimal_money/md_5.gif" border="1" height="248" hspace="10" width="471"&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;The following chart summarizes everything performance-wise.&amp;nbsp; The orange with the dot means that database performed the best; the x on the red background means it performed the worst.&lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.aaronbertrand.com/decimal_money/md_6.gif" border="1" height="248" hspace="10" width="644"&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;And this chart summarizes all things size-wise:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.aaronbertrand.com/decimal_money/md_7.gif" border="1" height="248" hspace="10" width="471"&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Of course, there is nothing overly definitive here.&amp;nbsp; DECIMAL(10,2) with row compression enabled got the most "first place" metrics, while MONEY with no compression and VARDECIMAL types never finished near the top of the class.&amp;nbsp; But you can judge from the results for yourself, and make decisions based on your own priorities.&lt;/p&gt;&lt;p&gt;&lt;b&gt;[UPDATE]&lt;/b&gt;&lt;br&gt;Alex asked for some metrics on more complex operations like SUM().&amp;nbsp; I ran some tests using both SUM() and AVG().&amp;nbsp; The logical reads of course are the same as all the others, and the scan costs remained unchanged as well.&amp;nbsp; But as for the observed performance of both calculations (compute scalar cost was identical for both operations), see the following chart:&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.aaronbertrand.com/decimal_money/md_8.gif" border="1" height="284" hspace="10" width="421"&gt;&lt;/p&gt;&lt;p&gt;Again, this was an average over 10 tests.&amp;nbsp; Note that I did not append these results to the summary charts I delivered above.&amp;nbsp; And sorry about the slightly different-looking screen shot.&lt;br&gt;&lt;b&gt;[/UPDATE]&lt;/b&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Please take into account that these tests were performed on a dual-core laptop computer, and the database files were created on external storage. There are many other tests I could have run to glean more performance and storage data, against a much larger data set, and using production-class hardware, but for the scope of this post I just wanted to glance at the most basic operations.&amp;nbsp; I repeated these tests 10 times from start to finish, so each metric taken is an average of 10 tests (in a lot of cases they were the same every time).&lt;/p&gt;
&lt;p&gt;This was a very tedious exercise to perform.&amp;nbsp; If you would like to perform your own tests, with your own sample data, and on your own hardware, I will more than gladly share my scripts.&amp;nbsp; I'd post them here right now, but they are scattered and not distribution-friendly at this point.&amp;nbsp;&lt;/p&gt;
&lt;BR&gt;&lt;div class = "shareblock"&gt;&lt;span class = "shareblockTitle"&gt;Share this post:&lt;/span&gt;&lt;span class = "shareblockLink"&gt; &lt;a href = "mailto:?subject=Performance / Storage Comparisons : MONEY vs. DECIMAL&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Performance / Storage Comparisons : MONEY vs. DECIMAL%0A%0Ahttp://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/27/performance-storage-comparisons-money-vs-decimal.aspx" target="_blank" title = "Email Performance / Storage Comparisons : MONEY vs. DECIMAL"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/27/performance-storage-comparisons-money-vs-decimal.aspx&amp;amp;title=Performance+%2f+Storage+Comparisons+%3a+MONEY+vs.+DECIMAL" target="_blank" title = "Submit Performance / Storage Comparisons : MONEY vs. DECIMAL to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/27/performance-storage-comparisons-money-vs-decimal.aspx&amp;amp;phase=2" target="_blank" title = "Submit Performance / Storage Comparisons : MONEY vs. DECIMAL to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/27/performance-storage-comparisons-money-vs-decimal.aspx&amp;amp;title=Performance+%2f+Storage+Comparisons+%3a+MONEY+vs.+DECIMAL" target="_blank" title = "Submit Performance / Storage Comparisons : MONEY vs. DECIMAL to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/27/performance-storage-comparisons-money-vs-decimal.aspx&amp;amp;title=Performance+%2f+Storage+Comparisons+%3a+MONEY+vs.+DECIMAL" target="_blank" title = "Submit Performance / Storage Comparisons : MONEY vs. DECIMAL to DotNetKicks"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/27/performance-storage-comparisons-money-vs-decimal.aspx&amp;amp;title=Performance+%2f+Storage+Comparisons+%3a+MONEY+vs.+DECIMAL&amp;amp;;top=1" target="_blank" title = "Add Performance / Storage Comparisons : MONEY vs. DECIMAL to Live Bookmarks"&gt;live it!&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://info.sqlblog.com/a.aspx?ZoneID=0&amp;BannerID=12&amp;AdvertiserID=1&amp;CampaignID=12&amp;Task=Get&amp;Mode=TEXT&amp;SiteID=1&amp;RandomNumber=463323" width="1" height="1" border="0"&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=6473" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/backup+compression/default.aspx">backup compression</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/numeric+data+types/default.aspx">numeric data types</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/data+compression/default.aspx">data compression</category></item><item><title>Call a spade a spade!  (SQL injection, or IIS vulnerability?)</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/26/call-a-spade-a-spade.aspx</link><pubDate>Sat, 26 Apr 2008 16:06:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6465</guid><dc:creator>AaronBertrand</dc:creator><slash:comments>10</slash:comments><comments>http://sqlblog.com/blogs/aaron_bertrand/comments/6465.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/aaron_bertrand/commentrss.aspx?PostID=6465</wfw:commentRss><description>&lt;p&gt;&lt;font face="verdana,geneva"&gt;In a recent blog post, Dancho Danchev mis-labeled a recent IIS vulnerability as a "&lt;a href="http://ddanchev.blogspot.com/2008/04/united-nations-serving-malware.html" title="http://ddanchev.blogspot.com/2008/04/united-nations-serving-malware.html" target="_blank"&gt;massive SQL injection attack&lt;/a&gt;."&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="verdana,geneva"&gt;Let's be honest here.&amp;nbsp; Yes, this &lt;a href="http://securitylabs.websense.com/content/Alerts/3070.aspx" title="http://securitylabs.websense.com/content/Alerts/3070.aspx" target="_blank"&gt;alert&lt;/a&gt; needs attention.&amp;nbsp; But this is not a new SQL injection vulnerability.&amp;nbsp; It is simply an exploit in IIS that lets malicious users access your source code.&amp;nbsp; If your database is already open to SQL injection attacks by anyone who can access the file system on your web servers, then yes, SQL injection is just waiting for the next vulnerability to your file system.&amp;nbsp; However, if you protect your database server(s) from SQL injection in the first place, then no IIS vulnerability will magically become known as a SQL injection attack.&lt;br&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="verdana,geneva"&gt;Never mind that half the IIS servers in the world probably don't even connect to SQL Server, and of the remainder, not all are vulnerable to SQL injection.&amp;nbsp; The ones that are vulnerable are that way because the web developers and/or DBAs have been sloppy and allowed for practices that help make SQL injection possible.&lt;br&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="verdana,geneva"&gt;Call it what it is; don't sensationalize it.&amp;nbsp; And instead of trying to create panic, provide a little education!&amp;nbsp; How do you prevent an IIS vulnerability from becoming a SQL injection attack?&amp;nbsp; There are plenty of things you can do.&amp;nbsp; Some of them are pretty obvious, or have been discussed previously, but I'll recap the ones on my list:&lt;br&gt;&lt;/font&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;font face="verdana,geneva"&gt;&lt;b&gt;Do not expose your SQL Server to the Internet directly&lt;/b&gt;&lt;br&gt;While in some cases you can't avoid this (shared database servers at a hosting provider, for example), if your server-side code yields a public address, or enough information that the public address can be easily determined, then you are opening yourself up.&amp;nbsp; All someone needs is read access to your config file or ASP page in order to obtain credentials to access your SQL Server from anywhere.&amp;nbsp; Talk to your network administrator about keeping SQL Server behind your firewall.&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font face="verdana,geneva"&gt;&lt;b&gt;Make your passwords strong&lt;/b&gt;&lt;br&gt;Ideally, your applications will use Windows authentication, but if you must use mixed authentication modes, then make sure your SQL Authentication passwords are "strong" passwords.&amp;nbsp; It is very hard to be completely immune to a dictionary attack, but you can make it much more difficult by using a 16-character password with mixed case and alphanumerics, like '$QL$erver_r0ck$!', as opposed to an "easier" password like 'tweetybird.'&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font face="verdana,geneva"&gt;&lt;b&gt;Follow the principle of least privilege&lt;/b&gt;&lt;br&gt;Do not use sa as the login in the connection strings for your application.&amp;nbsp; Use a low-privileged user that can only execute (certain) stored procedures.&amp;nbsp; There is no reason someone should be able to add a query like "SELECT * FROM sys.objects" to your server-side code, or launch extended procedures like xp_cmdshell, or drop objects, because that user should not have sufficient access to do so... the application user should not be sa or db_owner.&amp;nbsp; Lock down your applications, and only give them the rights they need.&lt;br&gt;&lt;br&gt;Similarly, do not use a domain administrator or otherwise privileged user as the service account.&amp;nbsp; This would mean that anything that runs under the context of SQL Server has free reign over your server or even entire network, using a variety of tools like extended procedures.&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font face="verdana,geneva"&gt;&lt;b&gt;Always use stored procedures, or at least parameterized statements&lt;/b&gt;&lt;br&gt;If you build ad hoc SQL in your applications, then you are asking for SQL injection attacks, and I strongly suggest you become familiar with using stored procedures or parameterized queries.&amp;nbsp; Otherwise, all input becomes suspect, since it is very easy to use comments or semi-colons to change the meaning of queries or to append additional queries to be executed.&amp;nbsp; With a query that uses strongly typed parameters, however, this technique becomes fruitless.&amp;nbsp; This does not mean something like:&lt;br&gt;&lt;br&gt;&lt;table bgcolor="#eeeeee" cellpadding="10"&gt;&lt;tr&gt;&lt;td&gt;&lt;font face="courier new,courier"&gt;sql = "EXEC dbo.foo @param1 = '" &amp;amp; Request.QueryString("bar") &amp;amp; "'"&lt;br&gt;conn.execute(sql)&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;This is still vulnerable to SQL injection, because I can now call the page using ?bar=';drop table blat;--&lt;br&gt;&lt;br&gt;Instead you should use a command object and pass the inputs to parameters.&amp;nbsp; (This also prevents you from having to escape apostrophes in names like O'Hagan, delimit date literals correctly, etc.)&lt;br&gt;&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;font face="verdana,geneva"&gt;&lt;b&gt;Use TRY/CATCH to return more generic error messages&lt;/b&gt;&lt;br&gt;In order to prevent revealing your database structure, do not let errors like foreign key violations or other errors bubble up to the application.&amp;nbsp; This just gives your potential attacker more information about your database structure than they need to have.&amp;nbsp; Instead use error handling to say "That user does not exist" instead of the default error message SQL Server provides -- which gives specific table and column information back to the user.&amp;nbsp; If you are using ASP.Net, then you can make sure that you turn CustomErrorsMode to "On" or "RemoteOnly" and set compilation debug to "false"...&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font face="verdana,geneva"&gt;&lt;b&gt;Do not store passwords in your Users table&lt;/b&gt;&lt;br&gt;A lot of web applications store usernames and passwords so that their users can log in to the application.&amp;nbsp; Instead of storing a password in plain text, which can then be read easily by anyone who manages to gain read access to the Users table, store a hash of the password (using MD5 or something similar).&amp;nbsp; When the user attempts to login (hopefully via SSL), you use the same technique to hash their entry and compare the hashed values, instead of a clear text comparison.&amp;nbsp; Even if the user has read access to the stored procedure that implements the hash, all they can do with it is try and try and try... they cannot reverse engineer the data if you use a proper hashing technique.&lt;br&gt;&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;BR&gt;&lt;div class = "shareblock"&gt;&lt;span class = "shareblockTitle"&gt;Share this post:&lt;/span&gt;&lt;span class = "shareblockLink"&gt; &lt;a href = "mailto:?subject=Call a spade a spade!  (SQL injection, or IIS vulnerability?)&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Call a spade a spade!  (SQL injection, or IIS vulnerability?)%0A%0Ahttp://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/26/call-a-spade-a-spade.aspx" target="_blank" title = "Email Call a spade a spade!  (SQL injection, or IIS vulnerability?)"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/26/call-a-spade-a-spade.aspx&amp;amp;title=Call+a+spade+a+spade!++(SQL+injection%2c+or+IIS+vulnerability%3f)" target="_blank" title = "Submit Call a spade a spade!  (SQL injection, or IIS vulnerability?) to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/26/call-a-spade-a-spade.aspx&amp;amp;phase=2" target="_blank" title = "Submit Call a spade a spade!  (SQL injection, or IIS vulnerability?) to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/26/call-a-spade-a-spade.aspx&amp;amp;title=Call+a+spade+a+spade!++(SQL+injection%2c+or+IIS+vulnerability%3f)" target="_blank" title = "Submit Call a spade a spade!  (SQL injection, or IIS vulnerability?) to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/26/call-a-spade-a-spade.aspx&amp;amp;title=Call+a+spade+a+spade!++(SQL+injection%2c+or+IIS+vulnerability%3f)" target="_blank" title = "Submit Call a spade a spade!  (SQL injection, or IIS vulnerability?) to DotNetKicks"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/26/call-a-spade-a-spade.aspx&amp;amp;title=Call+a+spade+a+spade!++(SQL+injection%2c+or+IIS+vulnerability%3f)&amp;amp;;top=1" target="_blank" title = "Add Call a spade a spade!  (SQL injection, or IIS vulnerability?) to Live Bookmarks"&gt;live it!&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://info.sqlblog.com/a.aspx?ZoneID=0&amp;BannerID=12&amp;AdvertiserID=1&amp;CampaignID=12&amp;Task=Get&amp;Mode=TEXT&amp;SiteID=1&amp;RandomNumber=463323" width="1" height="1" border="0"&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=6465" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/sql+injection/default.aspx">sql injection</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/security/default.aspx">security</category></item><item><title>Don't want to call CSS / PSS to get a cumulative update?  You don't have to!</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/25/don-t-want-to-call-css-pss-to-get-a-cumjulative-update-you-don-t-have-to.aspx</link><pubDate>Fri, 25 Apr 2008 18:44:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6447</guid><dc:creator>AaronBertrand</dc:creator><slash:comments>4</slash:comments><comments>http://sqlblog.com/blogs/aaron_bertrand/comments/6447.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/aaron_bertrand/commentrss.aspx?PostID=6447</wfw:commentRss><description>&lt;p&gt;&lt;font face="verdana,geneva" size="2"&gt;Bob Ward posted a blog entry today where he explains the process of getting a cumulative update for SQL Server 2005 without having to call Microsoft's support team (they are called CSS now but you may remember them as PSS).&amp;nbsp; This is a great evolution in the process, which used to be very difficult (you had to open a support case and be deemed eligible to be issued a CU by a support engineer), and a few months ago they made it a little easier, allowing you to submit a form and have an engineer review it (without a phone call or a formal case), and up to a day later, you got an e-mail providing the download link(s).&amp;nbsp; Now, at least for post-SP2 cumulative updates, the e-mail containing the download is almost immediate. &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="verdana,geneva" size="2"&gt;Makes me wonder why they don't just make it downloadable like a service pack, but in any case, this is a great step forward.&amp;nbsp; You can see his post here:&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="verdana,geneva" size="2"&gt;&lt;a href="http://blogs.msdn.com/sqlreleaseservices/archive/2008/04/15/cumulative-update-7-for-sql-server-2005-service-pack-2-2.aspx" title="http://blogs.msdn.com/sqlreleaseservices/archive/2008/04/15/cumulative-update-7-for-sql-server-2005-service-pack-2-2.aspx" target="_blank"&gt;http://blogs.msdn.com/sqlreleaseservices/archive/2008/04/15/cumulative-update-7-for-sql-server-2005-service-pack-2-2.aspx&lt;/a&gt;&lt;/font&gt; &lt;br&gt;&lt;/p&gt;
&lt;BR&gt;&lt;div class = "shareblock"&gt;&lt;span class = "shareblockTitle"&gt;Share this post:&lt;/span&gt;&lt;span class = "shareblockLink"&gt; &lt;a href = "mailto:?subject=Don't want to call CSS / PSS to get a cumulative update?  You don't have to!&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Don't want to call CSS / PSS to get a cumulative update?  You don't have to!%0A%0Ahttp://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/25/don-t-want-to-call-css-pss-to-get-a-cumjulative-update-you-don-t-have-to.aspx" target="_blank" title = "Email Don't want to call CSS / PSS to get a cumulative update?  You don't have to!"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/25/don-t-want-to-call-css-pss-to-get-a-cumjulative-update-you-don-t-have-to.aspx&amp;amp;title=Don%27t+want+to+call+CSS+%2f+PSS+to+get+a+cumulative+update%3f++You+don%27t+have+to!" target="_blank" title = "Submit Don't want to call CSS / PSS to get a cumulative update?  You don't have to! to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/25/don-t-want-to-call-css-pss-to-get-a-cumjulative-update-you-don-t-have-to.aspx&amp;amp;phase=2" target="_blank" title = "Submit Don't want to call CSS / PSS to get a cumulative update?  You don't have to! to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/25/don-t-want-to-call-css-pss-to-get-a-cumjulative-update-you-don-t-have-to.aspx&amp;amp;title=Don%27t+want+to+call+CSS+%2f+PSS+to+get+a+cumulative+update%3f++You+don%27t+have+to!" target="_blank" title = "Submit Don't want to call CSS / PSS to get a cumulative update?  You don't have to! to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/25/don-t-want-to-call-css-pss-to-get-a-cumjulative-update-you-don-t-have-to.aspx&amp;amp;title=Don%27t+want+to+call+CSS+%2f+PSS+to+get+a+cumulative+update%3f++You+don%27t+have+to!" target="_blank" title = "Submit Don't want to call CSS / PSS to get a cumulative update?  You don't have to! to DotNetKicks"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://sqlblog.com/blogs/aaron_bertrand/archive/2008/04/25/don-t-want-to-call-css-pss-to-get-a-cumjulative-update-you-don-t-have-to.aspx&amp;amp;title=Don%27t+want+to+call+CSS+%2f+PSS+to+get+a+cumulative+update%3f++You+don%27t+have+to!&amp;amp;;top=1" target="_blank" title = "Add Don't want to call CSS / PSS to get a cumulative update?  You don't have to! to Live Bookmarks"&gt;live it!&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://info.sqlblog.com/a.aspx?ZoneID=0&amp;BannerID=12&amp;AdvertiserID=1&amp;CampaignID=12&amp;Task=Get&amp;Mode=TEXT&amp;SiteID=1&amp;RandomNumber=463323" width="1" height="1" border="0"&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=6447" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/hotfix/default.aspx">hotfix</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/cumulative+updates/default.aspx">cumulative updates</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/SQL+Server+2005/default.aspx">SQL Server 2005</category><category domain="http://sqlblog.com/blogs/aaron_bertrand/archive/tags/support/default.aspx">support</category></item></channel></rss>