<?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>SQLblog.com - The SQL Server blog spot on the web</title><link>http://sqlblog.com/blogs/default.aspx</link><description>THE SQL Server Blog Spot on the Web</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Be Aware of These Loopholes in Your Referential Integrity</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2008/05/13/be-aware-of-these-loopholes-in-your-referential-integrity.aspx</link><pubDate>Tue, 13 May 2008 22:17:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6783</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>0</slash:comments><description>

&lt;p class="MsoNormal"&gt;I am going to discuss several potential problems with referential
integrity, because they keep coming up in the newsgroups.&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b&gt;Parent and Child Tables
Are in Different Databases.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Although you cannot use a foreign key in this situation,
there are workarounds – you can use either triggers or UDFs wrapped in check
constraints. Either way, your data integrity is not completely watertight: if
the database with your parent table crashes and you restore it from a backup,
you may easily end up with orphans.&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b&gt;Parent-Child Relationship
Is Enforced by Triggers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;There are quite a few situations when triggers do not fire,
such as:&lt;/p&gt;

&lt;p class="MsoListParagraphCxSpFirst" style="text-indent:-0.25in;"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span&gt;·&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;A table is dropped.&lt;/p&gt;

&lt;p class="MsoListParagraphCxSpMiddle" style="text-indent:-0.25in;"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span&gt;·&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;A table is truncated.&lt;/p&gt;

&lt;p class="MsoListParagraphCxSpLast" style="text-indent:-0.25in;"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span&gt;·&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Settings for nested and/or recursive triggers
prevent a trigger from firing.&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Also a trigger may be just incorrect. Either way, you may
end up with orphans in your database.&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b&gt;Parent-Child Relationship
Is Enforced by UDFs Wrapped in Check Constraints.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Such “constraints” do not prevent from deleting parent rows.
Again, you may end up with orphans in your database.&lt;/p&gt;

&lt;p class="MsoNormal"&gt;In most cases the easiest and simplest way to enforce a
parent-child relationship is to use a built-in tool – do not reinvent the wheel,
have both tables in one database and use a foreign key.&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=Be Aware of These Loopholes in Your Referential Integrity&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Be Aware of These Loopholes in Your Referential Integrity%0A%0Ahttp://sqlblog.com/blogs/alexander_kuznetsov/archive/2008/05/13/be-aware-of-these-loopholes-in-your-referential-integrity.aspx" target="_blank" title = "Email Be Aware of These Loopholes in Your Referential Integrity"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/alexander_kuznetsov/archive/2008/05/13/be-aware-of-these-loopholes-in-your-referential-integrity.aspx&amp;amp;title=Be+Aware+of+These+Loopholes+in+Your+Referential+Integrity" target="_blank" title = "Submit Be Aware of These Loopholes in Your Referential Integrity to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/alexander_kuznetsov/archive/2008/05/13/be-aware-of-these-loopholes-in-your-referential-integrity.aspx&amp;amp;phase=2" target="_blank" title = "Submit Be Aware of These Loopholes in Your Referential Integrity to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/alexander_kuznetsov/archive/2008/05/13/be-aware-of-these-loopholes-in-your-referential-integrity.aspx&amp;amp;title=Be+Aware+of+These+Loopholes+in+Your+Referential+Integrity" target="_blank" title = "Submit Be Aware of These Loopholes in Your Referential Integrity to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/alexander_kuznetsov/archive/2008/05/13/be-aware-of-these-loopholes-in-your-referential-integrity.aspx&amp;amp;title=Be+Aware+of+These+Loopholes+in+Your+Referential+Integrity" target="_blank" title = "Submit Be Aware of These Loopholes in Your Referential Integrity 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/alexander_kuznetsov/archive/2008/05/13/be-aware-of-these-loopholes-in-your-referential-integrity.aspx&amp;amp;title=Be+Aware+of+These+Loopholes+in+Your+Referential+Integrity&amp;amp;;top=1" target="_blank" title = "Add Be Aware of These Loopholes in Your Referential Integrity 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=6783" width="1" height="1"&gt;</description></item><item><title>SQL Server 2008 Page Compression: Performance impact on inserts</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2008/05/12/sql-server-2008-page-compression-performance-impact-on-inserts.aspx</link><pubDate>Tue, 13 May 2008 02:49:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6773</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>1</slash:comments><description>&lt;P&gt;Before I begin, let me be very clear that the results I report in this post were obtained with SQL Server 2008 CTP6. Microsoft is still working on improving the performance of data compression. And in particular, the performance of inserting into a compressed table is expected to be significantly enhanced in SQL Server 2008 RTM.&lt;/P&gt;
&lt;P&gt;In my previous &lt;A href="http://sqlblog.com/blogs/linchi_shea/archive/2008/05/11/sql-server-2008-page-compression-compression-ratios-from-real-world-databases.aspx"&gt;post&lt;/A&gt;, I have shown that data compression can result in significant savings in storage space. In this post, I want to highlight the fact that not everything comes for free. Let's take a look at inserting into a B-tree table, i.e. a table with a clustered index. What is the performance impact of page compression on inserts? &lt;/P&gt;
&lt;P&gt;Note that you must use TABLOCK hint for pages to receive page-level compression when the pages of a heap table are being populated with the INSERT statement. So, heap tables are much less interesting, and&amp;nbsp;I'll hence focus only on B-tree tables. &lt;/P&gt;
&lt;P&gt;In my tests, I ran the following script:&lt;/P&gt;
&lt;DIV style="BACKGROUND-COLOR:#cccccc;"&gt;&lt;FONT face="Courier New"&gt;truncate table customer2;&lt;BR&gt;-- enable page compression&lt;BR&gt;alter table customer2 rebuild with (data_compression=page);&lt;BR&gt;go&lt;BR&gt;declare @dt datetime;&lt;BR&gt;select @dt = getdate();&lt;BR&gt;insert customer2 select * from customer;&lt;BR&gt;select 'insert into customer2 with compression', datediff(second, @dt, getdate());&lt;BR&gt;go&lt;BR&gt;truncate table customer2;&lt;BR&gt;-- disable compression&lt;BR&gt;alter table customer2 rebuild with (data_compression=none);&lt;BR&gt;go&lt;BR&gt;declare @dt datetime;&lt;BR&gt;select @dt = getdate();&lt;BR&gt;insert customer2 select * from customer;&lt;BR&gt;select 'insert into customer2 without compression', datediff(second, @dt, getdate());&lt;BR&gt;go&lt;BR&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;P&gt;The script measures the difference in the elapsed time of inserting 3,000,000 rows into (1) an empty table when page compression&amp;nbsp;is enabled, and (2) an empty table when no data compression&amp;nbsp;is enabled. The script was run multiple times to ensure that the elapsed times recorded were consistent. The following chart shows the results:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://sqlblog.com/blogs/linchi_shea/attachment/6773.ashx"&gt; &lt;/P&gt;
&lt;P&gt;Clearly, the impact of page compression on inserts was rather significant in the tests. Without data compression, inserting 3,000,000 rows took ~80 seconds, whereas it took 217 seconds when page compression was enabled on the target B-tree table. No free lunch!&lt;/P&gt;
&lt;P&gt;Again, these numbers were obtained with SQL Server 2008 CTP6, a work in progress build. I'll re-run the test once SQL Server 2008 RTM is released.&lt;/P&gt;
&lt;P&gt;Now that I have shown that there can be performance penalty in using data compression, next time I'll show that data compression can also help&amp;nbsp;improve your performance.&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 2008 Page Compression: Performance impact on inserts&amp;amp;body=Seen on SQLblog.com: %0A%0A%09SQL Server 2008 Page Compression: Performance impact on inserts%0A%0Ahttp://sqlblog.com/blogs/linchi_shea/archive/2008/05/12/sql-server-2008-page-compression-performance-impact-on-inserts.aspx" target="_blank" title = "Email SQL Server 2008 Page Compression: Performance impact on inserts"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/linchi_shea/archive/2008/05/12/sql-server-2008-page-compression-performance-impact-on-inserts.aspx&amp;amp;title=SQL+Server+2008+Page+Compression%3a+Performance+impact+on+inserts" target="_blank" title = "Submit SQL Server 2008 Page Compression: Performance impact on inserts to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/linchi_shea/archive/2008/05/12/sql-server-2008-page-compression-performance-impact-on-inserts.aspx&amp;amp;phase=2" target="_blank" title = "Submit SQL Server 2008 Page Compression: Performance impact on inserts to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/linchi_shea/archive/2008/05/12/sql-server-2008-page-compression-performance-impact-on-inserts.aspx&amp;amp;title=SQL+Server+2008+Page+Compression%3a+Performance+impact+on+inserts" target="_blank" title = "Submit SQL Server 2008 Page Compression: Performance impact on inserts to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/linchi_shea/archive/2008/05/12/sql-server-2008-page-compression-performance-impact-on-inserts.aspx&amp;amp;title=SQL+Server+2008+Page+Compression%3a+Performance+impact+on+inserts" target="_blank" title = "Submit SQL Server 2008 Page Compression: Performance impact on inserts 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/linchi_shea/archive/2008/05/12/sql-server-2008-page-compression-performance-impact-on-inserts.aspx&amp;amp;title=SQL+Server+2008+Page+Compression%3a+Performance+impact+on+inserts&amp;amp;;top=1" target="_blank" title = "Add SQL Server 2008 Page Compression: Performance impact on inserts 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=6773" width="1" height="1"&gt;</description><enclosure url="http://sqlblog.com/blogs/linchi_shea/attachment/6773.ashx" length="8414" type="image/gif" /><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Data+Compression/default.aspx">Data Compression</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Performance/default.aspx">Performance</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category></item><item><title>Visual Studio 2008 SP1 Beta</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2008/05/12/visual-studio-2008-sp1-beta.aspx</link><pubDate>Mon, 12 May 2008 18:58:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6764</guid><dc:creator>andyleonard</dc:creator><slash:comments>1</slash:comments><description>&lt;P&gt;&lt;A class="" href="http://weblogs.asp.net/scottgu" target=_blank&gt;ScottGu&lt;/A&gt; has a &lt;A class="" href="http://weblogs.asp.net/scottgu/archive/2008/05/12/visual-studio-2008-and-net-framework-3-5-service-pack-1-beta.aspx" target=_blank&gt;great post&lt;/A&gt; about enhancements in Visual Studio 2008 Service Pack 1, released today in Beta. &lt;/P&gt;
&lt;P&gt;Of particular interest to database developers: SQL Server 2008 support, a built-in Entity Data Modeler, and REST support!&lt;/P&gt;
&lt;P&gt;:{&amp;gt; Andy&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=Visual Studio 2008 SP1 Beta&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Visual Studio 2008 SP1 Beta%0A%0Ahttp://sqlblog.com/blogs/andy_leonard/archive/2008/05/12/visual-studio-2008-sp1-beta.aspx" target="_blank" title = "Email Visual Studio 2008 SP1 Beta"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/12/visual-studio-2008-sp1-beta.aspx&amp;amp;title=Visual+Studio+2008+SP1+Beta" target="_blank" title = "Submit Visual Studio 2008 SP1 Beta to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/12/visual-studio-2008-sp1-beta.aspx&amp;amp;phase=2" target="_blank" title = "Submit Visual Studio 2008 SP1 Beta to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/12/visual-studio-2008-sp1-beta.aspx&amp;amp;title=Visual+Studio+2008+SP1+Beta" target="_blank" title = "Submit Visual Studio 2008 SP1 Beta to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/12/visual-studio-2008-sp1-beta.aspx&amp;amp;title=Visual+Studio+2008+SP1+Beta" target="_blank" title = "Submit Visual Studio 2008 SP1 Beta 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/andy_leonard/archive/2008/05/12/visual-studio-2008-sp1-beta.aspx&amp;amp;title=Visual+Studio+2008+SP1+Beta&amp;amp;;top=1" target="_blank" title = "Add Visual Studio 2008 SP1 Beta 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=6764" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/Database+Edition/default.aspx">Database Edition</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/Service+Packs/default.aspx">Service Packs</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category></item><item><title>Today is your last chance to submit questions for Erland Sommarskog and Craig Freedman</title><link>http://sqlblog.com/blogs/denis_gobo/archive/2008/05/12/6759.aspx</link><pubDate>Mon, 12 May 2008 14:47:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6759</guid><dc:creator>Denis Gobo</dc:creator><slash:comments>0</slash:comments><description>&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Time is almost up; this is the last chance to submit your questions to &lt;/FONT&gt;&lt;A href="http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6656.aspx"&gt;&lt;FONT face="Times New Roman" color=#800080 size=3&gt;Erland Sommarskog&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Times New Roman" size=3&gt; and &lt;/FONT&gt;&lt;A href="http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6655.aspx"&gt;&lt;FONT face="Times New Roman" size=3&gt;Craig Freedman&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Times New Roman" size=3&gt;. I mean, you don’t want me to come up with all the questions myself do you? That would be considered cruel and unusual punishment.&lt;/FONT&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=Today is your last chance to submit questions for Erland Sommarskog and Craig Freedman&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Today is your last chance to submit questions for Erland Sommarskog and Craig Freedman%0A%0Ahttp://sqlblog.com/blogs/denis_gobo/archive/2008/05/12/6759.aspx" target="_blank" title = "Email Today is your last chance to submit questions for Erland Sommarskog and Craig Freedman"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/12/6759.aspx&amp;amp;title=Today+is+your+last+chance+to+submit+questions+for+Erland+Sommarskog+and+Craig+Freedman" target="_blank" title = "Submit Today is your last chance to submit questions for Erland Sommarskog and Craig Freedman to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/12/6759.aspx&amp;amp;phase=2" target="_blank" title = "Submit Today is your last chance to submit questions for Erland Sommarskog and Craig Freedman to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/12/6759.aspx&amp;amp;title=Today+is+your+last+chance+to+submit+questions+for+Erland+Sommarskog+and+Craig+Freedman" target="_blank" title = "Submit Today is your last chance to submit questions for Erland Sommarskog and Craig Freedman to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/12/6759.aspx&amp;amp;title=Today+is+your+last+chance+to+submit+questions+for+Erland+Sommarskog+and+Craig+Freedman" target="_blank" title = "Submit Today is your last chance to submit questions for Erland Sommarskog and Craig Freedman 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/denis_gobo/archive/2008/05/12/6759.aspx&amp;amp;title=Today+is+your+last+chance+to+submit+questions+for+Erland+Sommarskog+and+Craig+Freedman&amp;amp;;top=1" target="_blank" title = "Add Today is your last chance to submit questions for Erland Sommarskog and Craig Freedman 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=6759" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/denis_gobo/archive/tags/Interview/default.aspx">Interview</category></item><item><title>SQL Server 2008 Page Compression: Compression ratios with real-world databases</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2008/05/11/sql-server-2008-page-compression-compression-ratios-from-real-world-databases.aspx</link><pubDate>Sun, 11 May 2008 23:20:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6750</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>9</slash:comments><description>&lt;P&gt;In my &lt;A href="http://sqlblog.com/blogs/linchi_shea/archive/2008/05/05/sql-server-2008-page-compression-using-multiple-processors.aspx"&gt;previous post&lt;/A&gt; on data compression, I looked at how rebuilding a table with page compression works with multiple processors via the MAXDOP option. In this post, I'll focus on what compression ratios&amp;nbsp;I have seen in the real-world databases. Now, if you understand how SQL Server 2008 data compression works, you know that what compression ratio you may get really depends on to what extent SQL Server can find duplicate values on the data/index pages. Consequently, one real-world database can have a very high compression ratio while another may have a very low compression ratio: there is no typical compression ratio to expect.&lt;/P&gt;
&lt;P&gt;That said, it is still interesting to&amp;nbsp;report what compression ratios I have seen with real customer databases instead of 'cooked' data. Before I give the results, let me define what&amp;nbsp;I mean by compression ratio:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT face="Courier New"&gt;&lt;B&gt;Compression Ratio = Uncompressed Size / Compressed Size&lt;/B&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;To see what kind of compression ratios I may run into with real-world databases, I randomly selected 14 customer databases. IN this blog post, these databases have been renamed to DB1, DB2, ..., DB13, and DB14 to&amp;nbsp;shield their identities. For each database, the following steps were performed:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Record the data size of sp_spaceused for the database. This is the uncompressed data size.&lt;/LI&gt;
&lt;LI&gt;For each user table in the database, rebuild it with page compression. This was done by generating and executing a script that contains the following ALTER TABLE statement for each table:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT face="Courier New"&gt;alter table &amp;lt;the_table&amp;gt; rebuild with (data_compression=page, maxdop=8);&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;Record the data size of sp_spaceused for the database. This is the compressed data size.&lt;/LI&gt;
&lt;LI&gt;For each user table in the database, rebuild the table with no compression, which effectively decompresses the table. This was done by generating and executing a script that contains the following ALTER TABLE statement for each table:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT face="Courier New"&gt;alter table &amp;lt;the_table&amp;gt; rebuild with (data_compression=none, maxdop=8);&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;Record the data size of sp_spaceused for the database. This is the decompressed data size.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;The data size obtained in Step 3 was used as database compressed size, and the data size obtained in Step 5 was used as the database uncompressed size. The data size obtained in Step 1 was not used because it may be polluted by fragmentation. If we used the data size from Step 1, we could potentially be using a size that was inflated by fragmentation, resulting in an incorrectly higher compression ratio.&lt;/P&gt;
&lt;P&gt;The following two charts summarize the results:&lt;/P&gt;&lt;IMG src="http://sqlblog.com/blogs/linchi_shea/attachment/6750.ashx"&gt; 
&lt;P&gt;The top chart includes the three database space measures mentioned above. As you can see, fragmentation was not a significant factor for these databases since the uncompressed size and decompressed size were quite close for each database. As it turned out, these databases were regularly maintained, including rebuilding clustered indexes, it's no surprise that there wasn't any serious fragmentation.&lt;/P&gt;
&lt;P&gt;To highlight the compressed ratios for these databases, the bottom chart plots the compression ratios. So for these databases, the compression ratios--obtained using SQL Server 2008 CTP6 page compression--vary between 1.7 and 5.6. &lt;/P&gt;
&lt;P&gt;The space savings were substantial with these databases. When decompressed, the total space usage was ~261GB. Compared that to the total space usage of ~88GB when compressed. In other words, SQL Server 2008 page compression would save us 173GB in storage space.&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 2008 Page Compression: Compression ratios with real-world databases&amp;amp;body=Seen on SQLblog.com: %0A%0A%09SQL Server 2008 Page Compression: Compression ratios with real-world databases%0A%0Ahttp://sqlblog.com/blogs/linchi_shea/archive/2008/05/11/sql-server-2008-page-compression-compression-ratios-from-real-world-databases.aspx" target="_blank" title = "Email SQL Server 2008 Page Compression: Compression ratios with real-world databases"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/linchi_shea/archive/2008/05/11/sql-server-2008-page-compression-compression-ratios-from-real-world-databases.aspx&amp;amp;title=SQL+Server+2008+Page+Compression%3a+Compression+ratios+with+real-world+databases" target="_blank" title = "Submit SQL Server 2008 Page Compression: Compression ratios with real-world databases to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/linchi_shea/archive/2008/05/11/sql-server-2008-page-compression-compression-ratios-from-real-world-databases.aspx&amp;amp;phase=2" target="_blank" title = "Submit SQL Server 2008 Page Compression: Compression ratios with real-world databases to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/linchi_shea/archive/2008/05/11/sql-server-2008-page-compression-compression-ratios-from-real-world-databases.aspx&amp;amp;title=SQL+Server+2008+Page+Compression%3a+Compression+ratios+with+real-world+databases" target="_blank" title = "Submit SQL Server 2008 Page Compression: Compression ratios with real-world databases to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/linchi_shea/archive/2008/05/11/sql-server-2008-page-compression-compression-ratios-from-real-world-databases.aspx&amp;amp;title=SQL+Server+2008+Page+Compression%3a+Compression+ratios+with+real-world+databases" target="_blank" title = "Submit SQL Server 2008 Page Compression: Compression ratios with real-world databases 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/linchi_shea/archive/2008/05/11/sql-server-2008-page-compression-compression-ratios-from-real-world-databases.aspx&amp;amp;title=SQL+Server+2008+Page+Compression%3a+Compression+ratios+with+real-world+databases&amp;amp;;top=1" target="_blank" title = "Add SQL Server 2008 Page Compression: Compression ratios with real-world databases 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=6750" width="1" height="1"&gt;</description><enclosure url="http://sqlblog.com/blogs/linchi_shea/attachment/6750.ashx" length="16981" type="image/gif" /><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Data+Compression/default.aspx">Data Compression</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Storage/default.aspx">Storage</category></item><item><title>Cisco VPN Client and Vista x64</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2008/05/09/cisco-vpn-client-and-vista-x64.aspx</link><pubDate>Fri, 09 May 2008 04:10:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6712</guid><dc:creator>andyleonard</dc:creator><slash:comments>10</slash:comments><description>&lt;P&gt;I am disappointed in Cisco. &lt;/P&gt;
&lt;P&gt;I have Vista Ultimate x64 installed on my snappy new Red laptop but I cannot install Cisco VPN Client software on it because Cisco VPN Client does not run on Vista 64-bit platforms. &lt;/P&gt;
&lt;P&gt;Digging around for a work-around, I came across a couple interesting comments. One &lt;A class="" href="http://geekswithblogs.net/evjen/archive/2007/01/01/102429.aspx#387268" target=_blank&gt;comment&lt;/A&gt;, from someone who claims to be with Cisco VPN Client Support, states: &lt;/P&gt;
&lt;P&gt;"...&lt;EM&gt;as mentioned many times on this thread, NO x86-64 support for Windows. Cisco IPSec client will NOT be ported to support 64bit version of Windows now or in the future. If you require 64bit support on Windows please look at migrating to AnyConnect.&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;Does Cisco think 64-bit OS's are a passing fad? Are they holding out for the 128-bit operating systems before bothering to release an upgrade? What's the logic behind such a move? There has to be some logical explanation... &lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://www.cisco.com/en/US/docs/security/vpn_client/anyconnect/anyconnect22/release/notes/anyconnect22rn.html#wp809197" target=_blank&gt;Release Notes&lt;/A&gt; for AnyConnect version 2.2 indicate something new (hardware?) is required to work with 64-bit Vista, but it's entirely possible I'm misreading the notes. I do not know what an Adaptive Security Appliance is.&lt;/P&gt;
&lt;P&gt;Other applications install and run in 32-bit mode. Is there some reason - security-related or other - that the Cisco VPN client cannot run in this mode? &lt;/P&gt;
&lt;P&gt;I'm forced to create a virtual PC with a 32-bit OS installed just so I can communicate with clients remotely. It is, as I wrote earlier, disappointing.&lt;/P&gt;
&lt;P&gt;:{&amp;gt; Andy&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=Cisco VPN Client and Vista x64&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Cisco VPN Client and Vista x64%0A%0Ahttp://sqlblog.com/blogs/andy_leonard/archive/2008/05/09/cisco-vpn-client-and-vista-x64.aspx" target="_blank" title = "Email Cisco VPN Client and Vista x64"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/09/cisco-vpn-client-and-vista-x64.aspx&amp;amp;title=Cisco+VPN+Client+and+Vista+x64" target="_blank" title = "Submit Cisco VPN Client and Vista x64 to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/09/cisco-vpn-client-and-vista-x64.aspx&amp;amp;phase=2" target="_blank" title = "Submit Cisco VPN Client and Vista x64 to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/09/cisco-vpn-client-and-vista-x64.aspx&amp;amp;title=Cisco+VPN+Client+and+Vista+x64" target="_blank" title = "Submit Cisco VPN Client and Vista x64 to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/09/cisco-vpn-client-and-vista-x64.aspx&amp;amp;title=Cisco+VPN+Client+and+Vista+x64" target="_blank" title = "Submit Cisco VPN Client and Vista x64 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/andy_leonard/archive/2008/05/09/cisco-vpn-client-and-vista-x64.aspx&amp;amp;title=Cisco+VPN+Client+and+Vista+x64&amp;amp;;top=1" target="_blank" title = "Add Cisco VPN Client and Vista x64 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=6712" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/Cisco/default.aspx">Cisco</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/EMPs+_2800_Expensive+Management+Practices_2900_/default.aspx">EMPs (Expensive Management Practices)</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/x64/default.aspx">x64</category></item><item><title>Kevin Hazzard on LINQ To SQL</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2008/05/09/kevin-hazzard-on-linq-to-sql.aspx</link><pubDate>Fri, 09 May 2008 03:54:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6711</guid><dc:creator>andyleonard</dc:creator><slash:comments>0</slash:comments><description>&lt;P&gt;&lt;A class="" href="http://www.gotnet.biz/Blog/Default.aspx" target=_blank&gt;Kevin Hazzard&lt;/A&gt; did an outstanding job presenting to the &lt;A class="" href="http://richmondsql.org/" target=_blank&gt;Richmond SQL Server Users Group&lt;/A&gt; this evening on LINQ To SQL!&lt;/P&gt;
&lt;P&gt;I really like the ORM / code generation aspects of this new feature of the .Net Framework 3.5. Seeing it in action made me yearn (a little)&amp;nbsp;for my application developer days. &lt;/P&gt;
&lt;P&gt;Kevin's VPC crashed a couple hours before his presentation so he recreated the presentation and three demos in 1.5 hours before the meeting - and they were &lt;EM&gt;not&lt;/EM&gt; simple demos, especially the last one. &lt;/P&gt;
&lt;P&gt;It's always cool to watch technology in the hands of a master.&lt;/P&gt;
&lt;P&gt;:{&amp;gt; Andy&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=Kevin Hazzard on LINQ To SQL&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Kevin Hazzard on LINQ To SQL%0A%0Ahttp://sqlblog.com/blogs/andy_leonard/archive/2008/05/09/kevin-hazzard-on-linq-to-sql.aspx" target="_blank" title = "Email Kevin Hazzard on LINQ To SQL"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/09/kevin-hazzard-on-linq-to-sql.aspx&amp;amp;title=Kevin+Hazzard+on+LINQ+To+SQL" target="_blank" title = "Submit Kevin Hazzard on LINQ To SQL to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/09/kevin-hazzard-on-linq-to-sql.aspx&amp;amp;phase=2" target="_blank" title = "Submit Kevin Hazzard on LINQ To SQL to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/09/kevin-hazzard-on-linq-to-sql.aspx&amp;amp;title=Kevin+Hazzard+on+LINQ+To+SQL" target="_blank" title = "Submit Kevin Hazzard on LINQ To SQL to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/09/kevin-hazzard-on-linq-to-sql.aspx&amp;amp;title=Kevin+Hazzard+on+LINQ+To+SQL" target="_blank" title = "Submit Kevin Hazzard on LINQ To SQL 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/andy_leonard/archive/2008/05/09/kevin-hazzard-on-linq-to-sql.aspx&amp;amp;title=Kevin+Hazzard+on+LINQ+To+SQL&amp;amp;;top=1" target="_blank" title = "Add Kevin Hazzard on LINQ To SQL 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=6711" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/database+design/default.aspx">database design</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/Developer+Community/default.aspx">Developer Community</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/software+developers/default.aspx">software developers</category></item><item><title>SSMS Tools PACK 1.0 is now available </title><link>http://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6708.aspx</link><pubDate>Thu, 08 May 2008 19:25:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6708</guid><dc:creator>Denis Gobo</dc:creator><slash:comments>3</slash:comments><description>&lt;P&gt;Mladen Prajdić just released &lt;A class="" href="http://www.ssmstoolspack.com/Main.aspx"&gt;SSMS Tools PACK 1.0&lt;/A&gt;. SSMS Tools PACK is an Add-In (Add-On) for Microsoft SQL Server Management Studio and Microsoft SQL Server Management Studio Express.&lt;/P&gt;
&lt;P&gt;Here are some of the features&lt;/P&gt;
&lt;P&gt;Uppercase/Lowercase keywords.&lt;BR&gt;Run one script on multiple databases.&lt;BR&gt;Copy execution plan bitmaps to clipboard.&lt;BR&gt;Search Results in Grid Mode and Execution Plans.&lt;BR&gt;Generate Insert statements for a single table, the whole database or current resultsets in grids.&lt;BR&gt;Query Execution History (Soft Source Control).&lt;BR&gt;Text document Regions and Debug sections.&lt;BR&gt;Running custom scripts from Object explorer's Context menu.&lt;BR&gt;CRUD (Create, Read, Update, Delete) stored procedure generation.&lt;BR&gt;New query template.&lt;/P&gt;
&lt;P&gt;Check it out here: &lt;A href="http://www.ssmstoolspack.com/Main.aspx"&gt;http://www.ssmstoolspack.com/Main.aspx&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=SSMS Tools PACK 1.0 is now available &amp;amp;body=Seen on SQLblog.com: %0A%0A%09SSMS Tools PACK 1.0 is now available %0A%0Ahttp://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6708.aspx" target="_blank" title = "Email SSMS Tools PACK 1.0 is now available "&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6708.aspx&amp;amp;title=SSMS+Tools+PACK+1.0+is+now+available+" target="_blank" title = "Submit SSMS Tools PACK 1.0 is now available  to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6708.aspx&amp;amp;phase=2" target="_blank" title = "Submit SSMS Tools PACK 1.0 is now available  to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6708.aspx&amp;amp;title=SSMS+Tools+PACK+1.0+is+now+available+" target="_blank" title = "Submit SSMS Tools PACK 1.0 is now available  to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6708.aspx&amp;amp;title=SSMS+Tools+PACK+1.0+is+now+available+" target="_blank" title = "Submit SSMS Tools PACK 1.0 is now available  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/denis_gobo/archive/2008/05/08/6708.aspx&amp;amp;title=SSMS+Tools+PACK+1.0+is+now+available+&amp;amp;;top=1" target="_blank" title = "Add SSMS Tools PACK 1.0 is now available  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=6708" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/denis_gobo/archive/tags/Tools/default.aspx">Tools</category></item><item><title>How to log when a function is called?</title><link>http://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6703.aspx</link><pubDate>Thu, 08 May 2008 17:25:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6703</guid><dc:creator>Denis Gobo</dc:creator><slash:comments>3</slash:comments><description>&lt;P&gt;This &lt;A class="" href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3311966&amp;amp;SiteID=1"&gt;question&lt;/A&gt; came up today and here is one way of doing it. It requires running xp_cmdshell so this is probably not such a good idea.&lt;BR&gt;The problem with functions is that you cannot just insert into any table. INSERT, UPDATE, and DELETE statements modifying table variables local to the function.&lt;BR&gt;EXECUTE statements calling an extended stored procedures are allowed. &lt;BR&gt;So with this in mind we know that we can call xp_cmdshell, from xp_cmdshell we can use osql&lt;BR&gt;Let's take a look&lt;BR&gt;We will be using tempdb &lt;BR&gt;&lt;BR&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&lt;BR&gt;--Create the table&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;USE&lt;/FONT&gt;&lt;FONT size=2&gt; tempdb&lt;BR&gt;go&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;CREATE&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;TABLE&lt;/FONT&gt;&lt;FONT size=2&gt; LogMeNow &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;SomeValue &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;varchar&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;50&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;),&lt;/FONT&gt;&lt;FONT size=2&gt; SomeDate &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;datetime&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;default&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff00ff size=2&gt;getdate&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;())&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;go&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;--Here is the proc&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;CREATE&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;PROC&lt;/FONT&gt;&lt;FONT size=2&gt; prLog &lt;BR&gt;@SomeValue &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;varchar&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;50&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;AS&lt;BR&gt;INSERT&lt;/FONT&gt;&lt;FONT size=2&gt; LogMeNow &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;SomeValue&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;VALUES&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;@SomeValue&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;go&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;--And here is the function&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;CREATE&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;FUNCTION&lt;/FONT&gt;&lt;FONT size=2&gt; fnBla&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;@id &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;RETURNS&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;BR&gt;AS&lt;BR&gt;BEGIN&lt;BR&gt;DECLARE&lt;/FONT&gt;&lt;FONT size=2&gt; @SQL &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;varchar&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;500&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;SELECT&lt;/FONT&gt;&lt;FONT size=2&gt; @SQL &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;=&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;'osql -S'&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;+&lt;/FONT&gt;&lt;FONT color=#ff00ff size=2&gt;@@servername&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;+&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;' -E -q "exec tempdb..prLog ''fnBla''"'&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;EXEC&lt;/FONT&gt;&lt;FONT size=2&gt; master&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;..&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;xp_cmdshell&lt;/FONT&gt;&lt;FONT size=2&gt; @SQL&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;RETURN&lt;/FONT&gt;&lt;FONT size=2&gt; @id&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;END&lt;BR&gt;&lt;/FONT&gt;&lt;BR&gt;Now call the function a couple of times&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;&lt;BR&gt;SELECT&lt;/FONT&gt;&lt;FONT size=2&gt; dbo&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;fnBla&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;1&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;SELECT&lt;/FONT&gt;&lt;FONT size=2&gt; dbo&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;fnBla&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;2&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;SELECT&lt;/FONT&gt;&lt;FONT size=2&gt; dbo&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;fnBla&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;4&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#808080 size=2&gt;
&lt;P&gt;&lt;BR&gt;&lt;/FONT&gt;And look inside the table&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;SELECT&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;*&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;FROM&lt;/FONT&gt;&lt;FONT size=2&gt; LogMeNow&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;What if you were to run this?&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;SELECT&lt;/FONT&gt;&lt;FONT size=2&gt; dbo&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;fnBla&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;4&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;),*&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;FROM &lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;sys.sysobjects&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size=2&gt;See the problem? The function will be called for &lt;STRONG&gt;every&lt;/STRONG&gt; row, if you have a big table this can be &lt;STRONG&gt;problematic&lt;/STRONG&gt;!!!!!!!!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;BR&gt;&lt;/FONT&gt;I tested this on SQL 2000 and on SQL 2005(including a named instance). So there you have it, this is one way. does it smell kludgy and do I feel somewhat dirty now? yes it does indeed :-(&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 to log when a function is called?&amp;amp;body=Seen on SQLblog.com: %0A%0A%09How to log when a function is called?%0A%0Ahttp://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6703.aspx" target="_blank" title = "Email How to log when a function is called?"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6703.aspx&amp;amp;title=How+to+log+when+a+function+is+called%3f" target="_blank" title = "Submit How to log when a function is called? to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6703.aspx&amp;amp;phase=2" target="_blank" title = "Submit How to log when a function is called? to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6703.aspx&amp;amp;title=How+to+log+when+a+function+is+called%3f" target="_blank" title = "Submit How to log when a function is called? to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6703.aspx&amp;amp;title=How+to+log+when+a+function+is+called%3f" target="_blank" title = "Submit How to log when a function is called? 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/denis_gobo/archive/2008/05/08/6703.aspx&amp;amp;title=How+to+log+when+a+function+is+called%3f&amp;amp;;top=1" target="_blank" title = "Add How to log when a function is called? 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=6703" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/denis_gobo/archive/tags/Functions/default.aspx">Functions</category><category domain="http://sqlblog.com/blogs/denis_gobo/archive/tags/logging/default.aspx">logging</category><category domain="http://sqlblog.com/blogs/denis_gobo/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category></item><item><title>SQL Teaser: @@ROWCOUNT</title><link>http://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6698.aspx</link><pubDate>Thu, 08 May 2008 14:50:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6698</guid><dc:creator>Denis Gobo</dc:creator><slash:comments>11</slash:comments><description>Without running this what do you think will be printed?&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;SET&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ROWCOUNT&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; 0&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR&gt;DECLARE&lt;/FONT&gt;&lt;FONT size=2&gt; @ &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;BR&gt;SET&lt;/FONT&gt;&lt;FONT size=2&gt; @ &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;=&lt;/FONT&gt;&lt;FONT size=2&gt;6&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;IF&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff00ff size=2&gt;@@ROWCOUNT&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;=&lt;/FONT&gt;&lt;FONT size=2&gt; 1&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PRINT&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;'yes'&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ELSE&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PRINT&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;'no'&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;PRINT&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff00ff size=2&gt;@@rowcount&lt;BR&gt;&lt;/FONT&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 Teaser: @@ROWCOUNT&amp;amp;body=Seen on SQLblog.com: %0A%0A%09SQL Teaser: @@ROWCOUNT%0A%0Ahttp://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6698.aspx" target="_blank" title = "Email SQL Teaser: @@ROWCOUNT"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6698.aspx&amp;amp;title=SQL+Teaser%3a+%40%40ROWCOUNT" target="_blank" title = "Submit SQL Teaser: @@ROWCOUNT to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6698.aspx&amp;amp;phase=2" target="_blank" title = "Submit SQL Teaser: @@ROWCOUNT to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6698.aspx&amp;amp;title=SQL+Teaser%3a+%40%40ROWCOUNT" target="_blank" title = "Submit SQL Teaser: @@ROWCOUNT to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/08/6698.aspx&amp;amp;title=SQL+Teaser%3a+%40%40ROWCOUNT" target="_blank" title = "Submit SQL Teaser: @@ROWCOUNT 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/denis_gobo/archive/2008/05/08/6698.aspx&amp;amp;title=SQL+Teaser%3a+%40%40ROWCOUNT&amp;amp;;top=1" target="_blank" title = "Add SQL Teaser: @@ROWCOUNT 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=6698" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/denis_gobo/archive/tags/Teaser/default.aspx">Teaser</category></item><item><title>SQLblog: New SQL Server Forum is now available</title><link>http://sqlblog.com/blogs/peter_debetta/archive/2008/05/08/sqlblog-new-sql-server-forum-is-now-available.aspx</link><pubDate>Thu, 08 May 2008 07:01:41 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6689</guid><dc:creator>Peter DeBetta</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;After numerous questions and requests, we decided to create a forum for all SQL Server related questions. You can view the new forum at &lt;a title="http://sqlblog.com/forums/57/ShowForum.aspx" href="http://sqlblog.com/forums/57/ShowForum.aspx"&gt;http://sqlblog.com/forums/57/ShowForum.aspx&lt;/a&gt; or use the Forums menu item on the site to browse there. We hope this new addition to the SQLblog community provides the members a valuable benefit and look forward to seeing your forum posts.&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=SQLblog: New SQL Server Forum is now available&amp;amp;body=Seen on SQLblog.com: %0A%0A%09SQLblog: New SQL Server Forum is now available%0A%0Ahttp://sqlblog.com/blogs/peter_debetta/archive/2008/05/08/sqlblog-new-sql-server-forum-is-now-available.aspx" target="_blank" title = "Email SQLblog: New SQL Server Forum is now available"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/peter_debetta/archive/2008/05/08/sqlblog-new-sql-server-forum-is-now-available.aspx&amp;amp;title=SQLblog%3a+New+SQL+Server+Forum+is+now+available" target="_blank" title = "Submit SQLblog: New SQL Server Forum is now available to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/peter_debetta/archive/2008/05/08/sqlblog-new-sql-server-forum-is-now-available.aspx&amp;amp;phase=2" target="_blank" title = "Submit SQLblog: New SQL Server Forum is now available to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/peter_debetta/archive/2008/05/08/sqlblog-new-sql-server-forum-is-now-available.aspx&amp;amp;title=SQLblog%3a+New+SQL+Server+Forum+is+now+available" target="_blank" title = "Submit SQLblog: New SQL Server Forum is now available to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/peter_debetta/archive/2008/05/08/sqlblog-new-sql-server-forum-is-now-available.aspx&amp;amp;title=SQLblog%3a+New+SQL+Server+Forum+is+now+available" target="_blank" title = "Submit SQLblog: New SQL Server Forum is now available 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/peter_debetta/archive/2008/05/08/sqlblog-new-sql-server-forum-is-now-available.aspx&amp;amp;title=SQLblog%3a+New+SQL+Server+Forum+is+now+available&amp;amp;;top=1" target="_blank" title = "Add SQLblog: New SQL Server Forum is now available 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=6689" width="1" height="1"&gt;</description></item><item><title>On Developer Communities: A Sponsor's Case Study</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2008/05/08/on-developer-communities-a-sponsor-s-case-study.aspx</link><pubDate>Thu, 08 May 2008 03:01:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6688</guid><dc:creator>andyleonard</dc:creator><slash:comments>0</slash:comments><description>&lt;P&gt;&lt;STRONG&gt;Introduction&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I wrote a series of posts recently about the developer community. I started each post with a linked&amp;nbsp;summary of the previous posts, which I will continue here:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;On Developer Communities...&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hold the following hypotheses about successful, growing, and thriving developer communities:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A class="" href="http://sqlblog.com/blogs/andy_leonard/archive/2008/04/21/on-developer-communities-the-team-builder.aspx" target=_blank&gt;&lt;FONT color=#02469b&gt;First, you need a team builder&lt;/FONT&gt;&lt;/A&gt;.&amp;nbsp; 
&lt;LI&gt;&lt;A class="" href="http://sqlblog.com/blogs/andy_leonard/archive/2008/04/22/on-developer-communities-you-can-tune-a-piano-but-you-can-t-tuna-fish.aspx" target=_blank&gt;&lt;FONT color=#02469b&gt;You can run a company like a user group, but the inverse is not always true.&lt;/FONT&gt;&lt;/A&gt; 
&lt;LI&gt;&lt;A class="" href="http://sqlblog.com/blogs/andy_leonard/archive/2008/04/23/on-developer-communities-quality-is-job-zero.aspx" target=_blank&gt;&lt;FONT color=#02469b&gt;Quality always works.&lt;/FONT&gt;&lt;/A&gt; 
&lt;LI&gt;&lt;A class="" href="http://sqlblog.com/blogs/andy_leonard/archive/2008/04/24/on-developer-communities-people-are-people.aspx" target=_blank&gt;&lt;FONT color=#02469b&gt;People are not resources or assets&lt;/FONT&gt;&lt;/A&gt;. 
&lt;LI&gt;&lt;A class="" href="http://sqlblog.com/blogs/andy_leonard/archive/2008/04/25/on-developer-communities-hangin-around.aspx" target=_blank&gt;Don't go away.&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://sqlblog.com/blogs/andy_leonard/archive/2008/04/26/on-developer-communities-the-sponsorship-plan.aspx" target=_blank&gt;Have a&amp;nbsp;(Sponsorship) Plan&lt;/A&gt;.&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;A Sponsor's Perspective&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I recently emailed one of our sponsors to ask them "What do you get out of this?" With his permission, I share the response from Brock Barnett of &lt;A class="" href="http://www.maconit.com/" target=_blank&gt;MaconIT&lt;/A&gt;, a direct hire staffing and consulting firm in the Richmond, Charlottesville, and Roanoke Virginia markets:&lt;/P&gt;
&lt;P&gt;"&lt;EM&gt;MaconIT has been involved with the Richmond .NET and Richmond SQL Server User Groups for a couple of years. Over the past two years we've become Platinum sponsors and our investment (both time and money) has been well worth it. Our involvement with the User Groups has allowed us to get introduced to new clients, potential new candidates, learn cutting edge technology and expand our name recognition in the area. The committment that the User Groups have made to Richmond have also helped to promote the growth of Microsoft products in the area which in turn has helped to keep the local IT market very dynamic. While it's sometimes difficult to measure ROI, we feel that our sponsorship of the User Groups has been vital to our growth. We feel very fortunate to have been a part of the .NET and SQL Server Groups and look forward to continued invovlement!&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;Thanks to Brock, Gregg, and Carin at &lt;A class="" href="http://www.maconit.com/" target=_blank&gt;MaconIT&lt;/A&gt;&amp;nbsp;and dozens of companies in the Richmond market, the Richmond Developer Community is experiencing record participation, growth, and event attendance.&amp;nbsp;We appreciate&amp;nbsp;all&amp;nbsp;our sponsors&amp;nbsp;do for us!&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Conclusion&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I believe successful user groups are part of the local business ecosystem. We fill a niche by providing free training to folks who are interested enough to give up an evening or day&amp;nbsp;of personal time to attend an event. These people&amp;nbsp;are the passionate developers (or developers-to-be) that companies like &lt;A class="" href="http://www.maconit.com/" target=_blank&gt;MaconIT&lt;/A&gt;&amp;nbsp;want to represent in the market. And, believe it or not, schmoozing with the local developer community is an excellent networking opportunity. At each meeting, someone is in attendance looking for a developer or DBA. Cards and email addresses are exchanged&amp;nbsp;and announcements are made.&lt;/P&gt;
&lt;P&gt;It's really cool of local technology companies like &lt;A class="" href="http://www.maconit.com/" target=_blank&gt;MaconIT&lt;/A&gt;&amp;nbsp;to participate in our endeavors. It's even better that they realize tangible results for their participation. I love win-win scenarios!&lt;/P&gt;
&lt;P&gt;:{&amp;gt; Andy&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=On Developer Communities: A Sponsor's Case Study&amp;amp;body=Seen on SQLblog.com: %0A%0A%09On Developer Communities: A Sponsor's Case Study%0A%0Ahttp://sqlblog.com/blogs/andy_leonard/archive/2008/05/08/on-developer-communities-a-sponsor-s-case-study.aspx" target="_blank" title = "Email On Developer Communities: A Sponsor's Case Study"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/08/on-developer-communities-a-sponsor-s-case-study.aspx&amp;amp;title=On+Developer+Communities%3a+A+Sponsor%27s+Case+Study" target="_blank" title = "Submit On Developer Communities: A Sponsor's Case Study to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/08/on-developer-communities-a-sponsor-s-case-study.aspx&amp;amp;phase=2" target="_blank" title = "Submit On Developer Communities: A Sponsor's Case Study to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/08/on-developer-communities-a-sponsor-s-case-study.aspx&amp;amp;title=On+Developer+Communities%3a+A+Sponsor%27s+Case+Study" target="_blank" title = "Submit On Developer Communities: A Sponsor's Case Study to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/08/on-developer-communities-a-sponsor-s-case-study.aspx&amp;amp;title=On+Developer+Communities%3a+A+Sponsor%27s+Case+Study" target="_blank" title = "Submit On Developer Communities: A Sponsor's Case Study 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/andy_leonard/archive/2008/05/08/on-developer-communities-a-sponsor-s-case-study.aspx&amp;amp;title=On+Developer+Communities%3a+A+Sponsor%27s+Case+Study&amp;amp;;top=1" target="_blank" title = "Add On Developer Communities: A Sponsor's Case Study 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=6688" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/Developer+Community/default.aspx">Developer Community</category></item><item><title>On Technical Leadership: Things Get Easier</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2008/05/07/on-technical-leadership-things-get-easier.aspx</link><pubDate>Wed, 07 May 2008 18:00:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6664</guid><dc:creator>andyleonard</dc:creator><slash:comments>2</slash:comments><description>&lt;P&gt;&lt;STRONG&gt;Introduction&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;A long time ago in a place not so far away from Farmville, I learned Motorola 6800 machine code. It wasn't easy but with patient instruction from my neighbor, I was soon making things happen on the computer screen and in memory. I was hooked!&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Fast Forward 3.3 Decades...&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I'm still hooked! That thrill was and&amp;nbsp;remains my motivation for doing this work. I've learned it's contagious and I think that's a good thing.&lt;/P&gt;
&lt;P&gt;I now use&amp;nbsp;higher-level programming languages to accomplish screen and memory interaction, but it's the same thrill when it fires up and runs. I've noticed a trend over the past three decades or so: interacting with the machine is now easier. It's not just that I can do more in less time - the things I can do are easier to learn (for the most part) while being more complex, flexible, and powerful.&lt;/P&gt;
&lt;P&gt;I am reminded of a scene from a Star Trek movie (&lt;A class="" href="http://en.wikipedia.org/wiki/Star_Trek_IV:_The_Voyage_Home" target=_blank&gt;Star Trek IV&lt;/A&gt; - I'm talking old school &lt;A class="" href="http://en.wikipedia.org/wiki/Star_trek" target=_blank&gt;Star Trek&lt;/A&gt; here) where Scotty interacts with a 1984-era desktop. At first he speaks to the computer. When the computer doesn't answer Dr. McCoy hands him the mouse, which Scotty then speaks into as if it's a microphone. It's a funny scene and one that makes sense. The rest of the scene departs from the reality expressed in the first part as Scotty cracks his knuckles and begins frantically typing at the keyboard to ultimately reveal the molecular structure of tranparent aluminum.&lt;/P&gt;
&lt;P&gt;The reason I call this a departure? Things get easier. Scotty could no more return to 1984 and interact with a program than you or I could travel back in time to the mid-1940's and&amp;nbsp;program &lt;A class="" href="http://en.wikipedia.org/wiki/Eniac" target=_blank&gt;ENIAC&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;And We Liked It!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Things were different when&amp;nbsp;I learned M6800 hex. I had to learn about registers and accumulators and bit-shifting - things that still occur inside the CPU but that we rarely have to think about to develop&amp;nbsp;software these days. Why? We use higher order languages. &lt;/P&gt;
&lt;P&gt;As mathematics gives way to geometry and&amp;nbsp;algebra, and then to the Calculus, our knowledge of software development has built upon itself as more powerful and more complex generations of programming languages have evolved. Gone (mostly) are the days of punch cards and keying base 16 numbers - which, believe it or not, were a vast improvement over previous methods. &lt;/P&gt;
&lt;P&gt;Even though some of us &lt;A class="" href="http://en.wikipedia.org/wiki/A_Grumpy_Old_Man#A_Grumpy_Old_Man" target=_blank&gt;grumpy old men&lt;/A&gt; may have liked it that way, things changed.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Things Got Better&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Abstraction allowed us to do more. It allows us to manage (or at least mask some of) the complexity of software development. It also allowed us to do it faster. There's a natural progression from simple-and-less-functional to complex-and-more-functional. We're surrounded by it in nature. It's here and it's not going anywhere soon. &lt;/P&gt;
&lt;P&gt;Grow with it or be overgrown.&lt;/P&gt;
&lt;P&gt;It's the law of nature we inherited, overloaded, and extended to use in software development. It will not change.&lt;/P&gt;
&lt;P&gt;That doesn't mean it's perfect - it's not perfect. Joel Spolsky (very effectively) argues &lt;A class="" href="http://www.joelonsoftware.com/articles/LeakyAbstractions.html" target=_blank&gt;abstractions leak&lt;/A&gt; and&amp;nbsp;leaky abstractions&amp;nbsp;ultimately slow us down and add work.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;In The Box&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So how can I say things got better? Allow me to qualify that statement: Generic things got better. &lt;/P&gt;
&lt;P&gt;So long as one remains within the confines defined by good people in charge of the abstraction in the first place, things will usually go well. It's when&amp;nbsp;one approaches (or crosses)&amp;nbsp;the edge that stuff gets all whacky (that's the technical term). Stay within the box or prepare to slay the dragons.&lt;/P&gt;
&lt;P&gt;Should abstraction work this way? That's open for debate, in my opinion. The fact that it is - and finding some way to effectively deal with it - is a more productive discussion.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;How &lt;EM&gt;Not&lt;/EM&gt; To Do It&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;As a consultant I visited a shop that had experienced a recent turnover in their database department. The new team was in place and they were committed and eager and excited to set things right&amp;nbsp;about the previous crew's work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now.&lt;/P&gt;
&lt;P&gt;If you walk into a situation like this as a consultant, several red flags should be flapping loudly as they are hastily raised in&amp;nbsp;an increasingly turgid&amp;nbsp;breeze in your consulting brain. If you find yourself sitting in an interview and the interviewer says something along the lines of "Everyone quit," several questions should leap to mind, including:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV&gt;Why did everyone quit?&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;But I digress... &lt;/P&gt;
&lt;P&gt;I was tasked with converting a process from an older platform to a newer platform. The older platform was poorly documented. Which is to say there was nothing written down, but there did exist a screencast recorded by one of the developers of the application - no doubt after he'd submitted a notice - containing a rambling explanation that most likely made perfect sense to anyone who built the application in the first place, but did very little&amp;nbsp;for someone walking in the door with no experience using the application.&lt;/P&gt;
&lt;P&gt;So I asked one of the fresh new team members for help. The response: "Have you seen the video?"&lt;/P&gt;
&lt;P&gt;It's difficult to grasp the tone of this response when written as above. So let me add the additional&amp;nbsp;message that was being communicated: "When I started this position &lt;EM&gt;n&lt;/EM&gt; months ago this was all I had and I hated that I did not have more to go on, but I also ignored the large collection of red flags during the interview process and found myself stuck in this job with no net after leaving my last position. And now &lt;EM&gt;you&lt;/EM&gt; walk in with your fancy I'm-here-to-save-the-day attitude and high hourly rate and you expect &lt;EM&gt;me&lt;/EM&gt; to share &lt;EM&gt;anything&lt;/EM&gt; I've learned with &lt;EM&gt;you&lt;/EM&gt;? Ha!"&lt;/P&gt;
&lt;P&gt;Did I mention this was a fun gig?&lt;/P&gt;
&lt;P&gt;My point is this: You don't do anyone any favors by amplifying the inherent difficulties of abstraction. You don't personally benefit from it, and neither does anyone else.&lt;/P&gt;
&lt;P&gt;Footnote:&amp;nbsp;All members&amp;nbsp;of the "new" team at this location have either moved on or are about to.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;How To Do It&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The way to overcome the inherent difficulties of approaching the boundaries of abstraction is to understand the stuff that's being abstracted. &lt;/P&gt;
&lt;P&gt;"But Andy," you ask, "doesn't that undo the benefit of abstraction in the first place?" I'm glad you asked. It certainly can, but this can be mitigated. How? In stark contrast to the exchange above, team communication and collaboration is one way.&lt;/P&gt;
&lt;P&gt;Another way is to only hire people who know everything. This second option can be pricey, but can also be worth the price. To quote Andy Warren, "&lt;A class="" href="http://blogs.sqlservercentral.com/andy_warren/default.aspx" target=_blank&gt;It depends&lt;/A&gt;." &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Conclusion&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Regardless of how we choose to deal with the overhead associated with managing abstraction, manage it we must. Even with its inherent difficulties, it is the way we will progress for the forseeable future.&lt;/P&gt;
&lt;P&gt;:{&amp;gt;&lt;/P&gt;
&lt;P&gt;&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=On Technical Leadership: Things Get Easier&amp;amp;body=Seen on SQLblog.com: %0A%0A%09On Technical Leadership: Things Get Easier%0A%0Ahttp://sqlblog.com/blogs/andy_leonard/archive/2008/05/07/on-technical-leadership-things-get-easier.aspx" target="_blank" title = "Email On Technical Leadership: Things Get Easier"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/07/on-technical-leadership-things-get-easier.aspx&amp;amp;title=On+Technical+Leadership%3a+Things+Get+Easier" target="_blank" title = "Submit On Technical Leadership: Things Get Easier to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/07/on-technical-leadership-things-get-easier.aspx&amp;amp;phase=2" target="_blank" title = "Submit On Technical Leadership: Things Get Easier to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/07/on-technical-leadership-things-get-easier.aspx&amp;amp;title=On+Technical+Leadership%3a+Things+Get+Easier" target="_blank" title = "Submit On Technical Leadership: Things Get Easier to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/andy_leonard/archive/2008/05/07/on-technical-leadership-things-get-easier.aspx&amp;amp;title=On+Technical+Leadership%3a+Things+Get+Easier" target="_blank" title = "Submit On Technical Leadership: Things Get Easier 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/andy_leonard/archive/2008/05/07/on-technical-leadership-things-get-easier.aspx&amp;amp;title=On+Technical+Leadership%3a+Things+Get+Easier&amp;amp;;top=1" target="_blank" title = "Add On Technical Leadership: Things Get Easier 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=6664" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/Complexity/default.aspx">Complexity</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/database+developers/default.aspx">database developers</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/Software+Business/default.aspx">Software Business</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/software+developers/default.aspx">software developers</category></item><item><title>Should SQL Server Have The CREATE [OR REPLACE] PROCEDURE Syntax?</title><link>http://sqlblog.com/blogs/denis_gobo/archive/2008/05/07/6673.aspx</link><pubDate>Wed, 07 May 2008 15:53:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6673</guid><dc:creator>Denis Gobo</dc:creator><slash:comments>19</slash:comments><description>&lt;DIV&gt;I was asked by a developer at work the other day why SQL Server does not have the create or replace syntax. I started thinking and there were some advantages and one big disadvantage &lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;First the advantages &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;Advantage&lt;/STRONG&gt;&lt;BR&gt;When scripting out a database you don’t have to generate if exists.....drop statements &lt;BR&gt;&lt;BR&gt;When modifying an object from a file in source control you don’t have to change back and forth between CREATE and ALTER. This is really annoying sometimes; usually you create a proc or script out a proc and store it in Subversion/SourceSafe. Now you take that file, make some changes to the proc and run it. Of course it will tell you that the proc already exists, in general you don’t want to drop the proc and then execute the CREATE proc statement because then you have to worry about the permissions.(not everyone is running as dbo you know) &lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;Disadvantage&lt;/STRONG&gt; &lt;BR&gt;I can overwrite a proc without even knowing it. What if we both are working on a proc and somehow we pic the same name I create my proc, you work in a remote location, you create yours and mine is gone. &lt;BR&gt;&lt;BR&gt;Of course it is all what you are used to, I am sure the Oracle guys are not overwriting each other’s procs every day either &lt;BR&gt;&lt;BR&gt;So what do you think? Would you be in favor of this syntax or not? Can you think of more advantages or disadvantages?&lt;/DIV&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=Should SQL Server Have The CREATE [OR REPLACE] PROCEDURE Syntax?&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Should SQL Server Have The CREATE [OR REPLACE] PROCEDURE Syntax?%0A%0Ahttp://sqlblog.com/blogs/denis_gobo/archive/2008/05/07/6673.aspx" target="_blank" title = "Email Should SQL Server Have The CREATE [OR REPLACE] PROCEDURE Syntax?"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/07/6673.aspx&amp;amp;title=Should+SQL+Server+Have+The+CREATE+%5bOR+REPLACE%5d+PROCEDURE+Syntax%3f" target="_blank" title = "Submit Should SQL Server Have The CREATE [OR REPLACE] PROCEDURE Syntax? to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/07/6673.aspx&amp;amp;phase=2" target="_blank" title = "Submit Should SQL Server Have The CREATE [OR REPLACE] PROCEDURE Syntax? to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/07/6673.aspx&amp;amp;title=Should+SQL+Server+Have+The+CREATE+%5bOR+REPLACE%5d+PROCEDURE+Syntax%3f" target="_blank" title = "Submit Should SQL Server Have The CREATE [OR REPLACE] PROCEDURE Syntax? to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/07/6673.aspx&amp;amp;title=Should+SQL+Server+Have+The+CREATE+%5bOR+REPLACE%5d+PROCEDURE+Syntax%3f" target="_blank" title = "Submit Should SQL Server Have The CREATE [OR REPLACE] PROCEDURE Syntax? 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/denis_gobo/archive/2008/05/07/6673.aspx&amp;amp;title=Should+SQL+Server+Have+The+CREATE+%5bOR+REPLACE%5d+PROCEDURE+Syntax%3f&amp;amp;;top=1" target="_blank" title = "Add Should SQL Server Have The CREATE [OR REPLACE] PROCEDURE Syntax? 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=6673" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/denis_gobo/archive/tags/General/default.aspx">General</category></item><item><title>Some things don't change - DB Snapshots &amp; Backups of Snapshots</title><link>http://sqlblog.com/blogs/rick_heiges/archive/2008/05/07/some-things-don-t-change-db-snapshots-backups-of-snapshots.aspx</link><pubDate>Wed, 07 May 2008 14:40:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6672</guid><dc:creator>RickHeiges</dc:creator><slash:comments>0</slash:comments><description>&lt;P&gt;Again, I wanted to blog about something that still does not change between 2005 and 2008.&amp;nbsp;At a recent conference, there were some great questions/ideas that should make it to Connect if they haven't already.&lt;/P&gt;
&lt;P&gt;When DB Snapshots were first introduced, one of the questions that I always heard was "Can I perform a Backup on the Snapshot?".&lt;/P&gt;
&lt;P&gt;Well - does this mean tht you can actually perform a SQL Backup of the DB Snapshot?&amp;nbsp; No - you can't do that.&amp;nbsp; Can I backup the DB Snapshot file with Windows Backup?&amp;nbsp; Yes, you can do that, but there is no way to "re-attach" a DB Snapshot file to a database.&amp;nbsp; So why bother?&lt;/P&gt;
&lt;P&gt;DB Snapshots are still available on a Mirrored DB.&amp;nbsp; We find that many people like this feature because of the ease of setup/management, but they do not like the fact that it is still an Enterprise Edition feature.&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=Some things don't change - DB Snapshots &amp;amp; Backups of Snapshots&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Some things don't change - DB Snapshots &amp;amp; Backups of Snapshots%0A%0Ahttp://sqlblog.com/blogs/rick_heiges/archive/2008/05/07/some-things-don-t-change-db-snapshots-backups-of-snapshots.aspx" target="_blank" title = "Email Some things don't change - DB Snapshots &amp;amp; Backups of Snapshots"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/rick_heiges/archive/2008/05/07/some-things-don-t-change-db-snapshots-backups-of-snapshots.aspx&amp;amp;title=Some+things+don%27t+change+-+DB+Snapshots+%26amp%3b+Backups+of+Snapshots" target="_blank" title = "Submit Some things don't change - DB Snapshots &amp;amp; Backups of Snapshots to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/rick_heiges/archive/2008/05/07/some-things-don-t-change-db-snapshots-backups-of-snapshots.aspx&amp;amp;phase=2" target="_blank" title = "Submit Some things don't change - DB Snapshots &amp;amp; Backups of Snapshots to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/rick_heiges/archive/2008/05/07/some-things-don-t-change-db-snapshots-backups-of-snapshots.aspx&amp;amp;title=Some+things+don%27t+change+-+DB+Snapshots+%26amp%3b+Backups+of+Snapshots" target="_blank" title = "Submit Some things don't change - DB Snapshots &amp;amp; Backups of Snapshots to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/rick_heiges/archive/2008/05/07/some-things-don-t-change-db-snapshots-backups-of-snapshots.aspx&amp;amp;title=Some+things+don%27t+change+-+DB+Snapshots+%26amp%3b+Backups+of+Snapshots" target="_blank" title = "Submit Some things don't change - DB Snapshots &amp;amp; Backups of Snapshots 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/rick_heiges/archive/2008/05/07/some-things-don-t-change-db-snapshots-backups-of-snapshots.aspx&amp;amp;title=Some+things+don%27t+change+-+DB+Snapshots+%26amp%3b+Backups+of+Snapshots&amp;amp;;top=1" target="_blank" title = "Add Some things don't change - DB Snapshots &amp;amp; Backups of Snapshots 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=6672" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/rick_heiges/archive/tags/High+Availability/default.aspx">High Availability</category><category domain="http://sqlblog.com/blogs/rick_heiges/archive/tags/SQL+2005/default.aspx">SQL 2005</category><category domain="http://sqlblog.com/blogs/rick_heiges/archive/tags/SQL+2008/default.aspx">SQL 2008</category></item><item><title>New England SQL Users Group &amp; Craig Freedman</title><link>http://sqlblog.com/blogs/andrew_kelly/archive/2008/05/06/new-england-sql-users-group-craig-freedman.aspx</link><pubDate>Tue, 06 May 2008 19:50:23 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6657</guid><dc:creator>Andrew Kelly</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Adam Machanic has already blogged about Craig's visit to New England coming up on May 8th but I wanted to re-iterate some points for the benefit of the folks planning to attend. Due to the large crowd expected we really need you to RSVP if you plan to attend to ensure we have enough chairs and Pizza for everyone:).&amp;#160; &lt;a href="http://www.red-gate.com/" target="_blank"&gt;Red Gate Software&lt;/a&gt; is sponsoring the event and it would be great to get the head count as close as possible to maximize the event potential. They made it possible to get a great speaker like Craig as out guest. See the link below if you need more info on how to RSVP or just want more details.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://sqlblog.com/blogs/adam_machanic/archive/2008/05/02/new-england-nesql-special-meeting-featuring-craig-freedman.aspx" href="http://sqlblog.com/blogs/adam_machanic/archive/2008/05/02/new-england-nesql-special-meeting-featuring-craig-freedman.aspx"&gt;http://sqlblog.com/blogs/adam_machanic/archive/2008/05/02/new-england-nesql-special-meeting-featuring-craig-freedman.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Thanks and hope to see you there...&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=New England SQL Users Group &amp;amp; Craig Freedman&amp;amp;body=Seen on SQLblog.com: %0A%0A%09New England SQL Users Group &amp;amp; Craig Freedman%0A%0Ahttp://sqlblog.com/blogs/andrew_kelly/archive/2008/05/06/new-england-sql-users-group-craig-freedman.aspx" target="_blank" title = "Email New England SQL Users Group &amp;amp; Craig Freedman"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/andrew_kelly/archive/2008/05/06/new-england-sql-users-group-craig-freedman.aspx&amp;amp;title=New+England+SQL+Users+Group+%26amp%3b+Craig+Freedman" target="_blank" title = "Submit New England SQL Users Group &amp;amp; Craig Freedman to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/andrew_kelly/archive/2008/05/06/new-england-sql-users-group-craig-freedman.aspx&amp;amp;phase=2" target="_blank" title = "Submit New England SQL Users Group &amp;amp; Craig Freedman to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/andrew_kelly/archive/2008/05/06/new-england-sql-users-group-craig-freedman.aspx&amp;amp;title=New+England+SQL+Users+Group+%26amp%3b+Craig+Freedman" target="_blank" title = "Submit New England SQL Users Group &amp;amp; Craig Freedman to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/andrew_kelly/archive/2008/05/06/new-england-sql-users-group-craig-freedman.aspx&amp;amp;title=New+England+SQL+Users+Group+%26amp%3b+Craig+Freedman" target="_blank" title = "Submit New England SQL Users Group &amp;amp; Craig Freedman 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/andrew_kelly/archive/2008/05/06/new-england-sql-users-group-craig-freedman.aspx&amp;amp;title=New+England+SQL+Users+Group+%26amp%3b+Craig+Freedman&amp;amp;;top=1" target="_blank" title = "Add New England SQL Users Group &amp;amp; Craig Freedman 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=6657" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/andrew_kelly/archive/tags/User+Groups/default.aspx">User Groups</category></item><item><title>What Would You Like To Ask Erland Sommarskog?</title><link>http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6656.aspx</link><pubDate>Tue, 06 May 2008 19:39:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6656</guid><dc:creator>Denis Gobo</dc:creator><slash:comments>9</slash:comments><description>&lt;P&gt;In the &lt;A id=ctl00_ctl00_bcr_AggregateBlogPosts_Posts___Posts_ctl16_TitleLink href="http://sqlblog.com/blogs/denis_gobo/archive/2008/05/01/6542.aspx"&gt;Who do you want to see interviewed next?&lt;/A&gt;&amp;nbsp;blog post I asked for some names of people who YOU would like to see interviewed. Erland Sommarskog's name was submitted in comments a couple of times. I contacted Erland and am happy to anounce that he has agreed to do this. &lt;/P&gt;
&lt;P&gt;The first time I heard of Erland Sommarskog was in the SQL Server programming newsgroups. I also read all the articles on his site. When I answer questions I usually give the link out to these 4 articles&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.sommarskog.se/arrays-in-sql.html"&gt;&lt;EM&gt;Arrays and Lists in SQL Server&lt;/EM&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.sommarskog.se/error-handling-II.html"&gt;&lt;EM&gt;Implementing Error Handling with Stored Procedures&lt;/EM&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.sommarskog.se/error-handling-I.html"&gt;&lt;EM&gt;Error Handling in SQL Server – a Background&lt;/EM&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;and of course &lt;A href="http://www.sommarskog.se/dynamic_sql.html"&gt;&lt;I&gt;The curse and blessings of dynamic SQL&lt;/I&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;And from Hugo's comment &lt;A href="http://sommarskog.se/dyn-search.html"&gt;&lt;EM&gt;Dynamic Search Conditions&lt;/EM&gt;&lt;/A&gt;&amp;nbsp;and &lt;A href="http://sommarskog.se/share_data.html"&gt;&lt;EM&gt;How to share data between stored procedures&lt;/EM&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I always wondered why he didn't write a SQL book. Hey, now I can ask him that&amp;nbsp; :-)&lt;/P&gt;
&lt;P&gt;Before you think of any questions please visit&amp;nbsp;Erland's page first (&lt;A href="http://www.sommarskog.se/index.html"&gt;http://www.sommarskog.se/index.html&lt;/A&gt;) and read some of the articles he wrote.&lt;/P&gt;
&lt;P&gt;You can submit questions until Monday May 12th and then I will forward the questions to Erland. &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=What Would You Like To Ask Erland Sommarskog?&amp;amp;body=Seen on SQLblog.com: %0A%0A%09What Would You Like To Ask Erland Sommarskog?%0A%0Ahttp://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6656.aspx" target="_blank" title = "Email What Would You Like To Ask Erland Sommarskog?"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6656.aspx&amp;amp;title=What+Would+You+Like+To+Ask+Erland+Sommarskog%3f" target="_blank" title = "Submit What Would You Like To Ask Erland Sommarskog? to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6656.aspx&amp;amp;phase=2" target="_blank" title = "Submit What Would You Like To Ask Erland Sommarskog? to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6656.aspx&amp;amp;title=What+Would+You+Like+To+Ask+Erland+Sommarskog%3f" target="_blank" title = "Submit What Would You Like To Ask Erland Sommarskog? to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6656.aspx&amp;amp;title=What+Would+You+Like+To+Ask+Erland+Sommarskog%3f" target="_blank" title = "Submit What Would You Like To Ask Erland Sommarskog? 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/denis_gobo/archive/2008/05/06/6656.aspx&amp;amp;title=What+Would+You+Like+To+Ask+Erland+Sommarskog%3f&amp;amp;;top=1" target="_blank" title = "Add What Would You Like To Ask Erland Sommarskog? 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=6656" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/denis_gobo/archive/tags/Interview/default.aspx">Interview</category></item><item><title>What Would You Like To Ask Craig Freedman?</title><link>http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6655.aspx</link><pubDate>Tue, 06 May 2008 18:03:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6655</guid><dc:creator>Denis Gobo</dc:creator><slash:comments>1</slash:comments><description>&lt;P&gt;In the &lt;A id=ctl00_ctl00_bcr_AggregateBlogPosts_Posts___Posts_ctl16_TitleLink href="http://sqlblog.com/blogs/denis_gobo/archive/2008/05/01/6542.aspx"&gt;Who do you want to see interviewed next?&lt;/A&gt;&amp;nbsp;blog post I asked for some names of people who YOU would like to see interviewed. Craig Freedman's name was submitted in comments a couple of times. I contacted Craig and am happy to anounce that he has agreed to do this. &lt;/P&gt;
&lt;P&gt;Before you think of any questions please visit Craig's blog first(&lt;A href="http://blogs.msdn.com/craigfr/"&gt;http://blogs.msdn.com/craigfr/&lt;/A&gt;) to get a feel of what kind of questions to ask. It would make sense to keep the questions focused on query processing, query execution, and query plans. I told Craig that if he doesn't like a question that he does not have to answer it.&lt;/P&gt;
&lt;P&gt;You can submit questions until Monday May 12th and then I will forward the questions to Craig&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&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=What Would You Like To Ask Craig Freedman?&amp;amp;body=Seen on SQLblog.com: %0A%0A%09What Would You Like To Ask Craig Freedman?%0A%0Ahttp://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6655.aspx" target="_blank" title = "Email What Would You Like To Ask Craig Freedman?"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6655.aspx&amp;amp;title=What+Would+You+Like+To+Ask+Craig+Freedman%3f" target="_blank" title = "Submit What Would You Like To Ask Craig Freedman? to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6655.aspx&amp;amp;phase=2" target="_blank" title = "Submit What Would You Like To Ask Craig Freedman? to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6655.aspx&amp;amp;title=What+Would+You+Like+To+Ask+Craig+Freedman%3f" target="_blank" title = "Submit What Would You Like To Ask Craig Freedman? to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6655.aspx&amp;amp;title=What+Would+You+Like+To+Ask+Craig+Freedman%3f" target="_blank" title = "Submit What Would You Like To Ask Craig Freedman? 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/denis_gobo/archive/2008/05/06/6655.aspx&amp;amp;title=What+Would+You+Like+To+Ask+Craig+Freedman%3f&amp;amp;;top=1" target="_blank" title = "Add What Would You Like To Ask Craig Freedman? 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=6655" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/denis_gobo/archive/tags/Interview/default.aspx">Interview</category></item><item><title>Do you depend on sp_depends (no pun intended)</title><link>http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6653.aspx</link><pubDate>Tue, 06 May 2008 16:50:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6653</guid><dc:creator>Denis Gobo</dc:creator><slash:comments>0</slash:comments><description>&lt;P&gt;I answered this question on the MSDN forums: &lt;A class="" href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3298831&amp;amp;SiteID=1&amp;amp;mode=1"&gt;How can I search all my sprocs to see if any use a function?&lt;/A&gt; &lt;BR&gt;Several people suggested using sp_depends. You can't really depend on sp_depends because of deferred name resolution. Take a look at this&lt;/P&gt;
&lt;P&gt;First create this proc&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;CREATE&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;PROC&lt;/FONT&gt;&lt;FONT size=2&gt; SomeTestProc&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;AS&lt;/P&gt;
&lt;P&gt;SELECT&lt;/FONT&gt;&lt;FONT size=2&gt; dbo&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;FONT size=2&gt;somefuction&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;1&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;GO&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;BR&gt;now create this function&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;CREATE&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;FUNCTION&lt;/FONT&gt;&lt;FONT size=2&gt; somefuction&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;@id &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;RETURNS&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/P&gt;
&lt;P&gt;AS&lt;/P&gt;
&lt;P&gt;BEGIN&lt;/P&gt;
&lt;P&gt;SELECT&lt;/FONT&gt;&lt;FONT size=2&gt; @id &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;=&lt;/FONT&gt;&lt;FONT size=2&gt; 1&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;RETURN&lt;/FONT&gt;&lt;FONT size=2&gt; @id&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;END&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;Go&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;BR&gt;now run this&lt;BR&gt;&lt;FONT color=#800000 size=2&gt;&lt;/P&gt;
&lt;P&gt;sp_depends&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;'somefuction'&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;result: Object does not reference any object, and no objects reference it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Most people will not create a proc before they have created the function. So when does this behavior rear its ugly head? When you script out all the objects in a database, if the function or any objects referenced by an object are created after the object that references them then sp_depends won't be 100% correct&lt;/P&gt;
&lt;P&gt;SQL Server 2005 makes it pretty easy to do it yourself&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;SELECT&lt;/FONT&gt;&lt;FONT size=2&gt; specific_name&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;,*&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;FROM&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;information_schema.routines&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;WHERE&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff00ff size=2&gt;object_definition&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#ff00ff size=2&gt;object_id&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;specific_name&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;))&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;LIKE&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;'%somefuction%'&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;
&lt;P&gt;AND&lt;/FONT&gt;&lt;FONT size=2&gt; routine_type &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;=&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;'procedure'&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW somefuction is not a type, I already had a somefunction but was too lazy to change more than one character&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 depend on sp_depends (no pun intended)&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Do you depend on sp_depends (no pun intended)%0A%0Ahttp://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6653.aspx" target="_blank" title = "Email Do you depend on sp_depends (no pun intended)"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6653.aspx&amp;amp;title=Do+you+depend+on+sp_depends+(no+pun+intended)" target="_blank" title = "Submit Do you depend on sp_depends (no pun intended) to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6653.aspx&amp;amp;phase=2" target="_blank" title = "Submit Do you depend on sp_depends (no pun intended) to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6653.aspx&amp;amp;title=Do+you+depend+on+sp_depends+(no+pun+intended)" target="_blank" title = "Submit Do you depend on sp_depends (no pun intended) to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/denis_gobo/archive/2008/05/06/6653.aspx&amp;amp;title=Do+you+depend+on+sp_depends+(no+pun+intended)" target="_blank" title = "Submit Do you depend on sp_depends (no pun intended) 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/denis_gobo/archive/2008/05/06/6653.aspx&amp;amp;title=Do+you+depend+on+sp_depends+(no+pun+intended)&amp;amp;;top=1" target="_blank" title = "Add Do you depend on sp_depends (no pun intended) 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=6653" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/denis_gobo/archive/tags/Gotcha/default.aspx">Gotcha</category><category domain="http://sqlblog.com/blogs/denis_gobo/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category></item><item><title>Use a SQL Agent Proxy for Special Tasks</title><link>http://sqlblog.com/blogs/allen_white/archive/2008/05/06/use-a-sql-agent-proxy-for-special-tasks.aspx</link><pubDate>Tue, 06 May 2008 11:34:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6646</guid><dc:creator>AllenMWhite</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;When SQL Server Agent runs its tasks it normally does so using the context of the service account you assigned to the Agent service.  This may or may not be the best context for your application, so you can set up a Proxy.  This allows you to run the task under the context of the account you set up in the proxy, and it's pretty easy to do.&lt;/p&gt;
&lt;p&gt;First, set up a Credential.  This defines the ADS login credentials the proxy will use.  You can do this under the Security tree in Object Explorer, or you can set it up in Transact-SQL like this:&lt;/p&gt;
&lt;pre&gt;CREATE CREDENTIAL [cred_MyCredential] WITH IDENTITY = N'MyDomain\MyLogin', SECRET = N'S0meComp1exP@ssw0rd'&lt;br&gt;GO&lt;br&gt;&lt;/pre&gt;
&lt;p&gt;Once the credential exists then you define the proxy.  Expand the tree under SQL Server Agent/Proxies, select the job task type you plan to use the proxy for, then right-click and select New Proxy, or use this Transact-SQL:&lt;/p&gt;
&lt;pre&gt;USE [msdb]&lt;br&gt;GO&lt;br&gt;EXEC msdb.dbo.sp_add_proxy @proxy_name=N'proxy_MyProxy',@credential_name=N'cred_MyCredential',&lt;br&gt;		@enabled=1&lt;br&gt;GO&lt;br&gt;EXEC msdb.dbo.sp_grant_proxy_to_subsystem @proxy_name=N'proxy_MyProxy', @subsystem_id=3&lt;br&gt;GO&lt;br&gt;&lt;br&gt;EXEC msdb.dbo.sp_grant_login_to_proxy @proxy_name=N'proxy_MyProxy', @msdb_role=N'SQLAgentUserRole'&lt;br&gt;GO&lt;br&gt;&lt;/pre&gt;
&lt;p&gt;In the sp_grant_proxy_to_subsystem stored procedure, @subsystem_id=3 indicates this proxy will be used to run Operating System commands.&lt;/p&gt;
&lt;p&gt;Once the proxy exists it can be selected in setting up a job task by specifying the new proxy in the &lt;b&gt;Run As&lt;/b&gt; dropdown in the task dialog.  If setting up the job through Transact-SQL you specify the proxy in the sp_add_jobstep stored procedure with the @proxy_name parameter:&lt;/p&gt;
&lt;pre&gt;EXEC @ReturnCode = msdb.dbo.sp_add_jobstep @job_id=@jobId, @step_name=N'Step 01',&lt;br&gt;		@step_id=1,&lt;br&gt;		@cmdexec_success_code=0,&lt;br&gt;		@on_success_action=1,&lt;br&gt;		@on_success_step_id=0,&lt;br&gt;		@on_fail_action=2,&lt;br&gt;		@on_fail_step_id=0,&lt;br&gt;		@retry_attempts=0,&lt;br&gt;		@retry_interval=0,&lt;br&gt;		@os_run_priority=0, @subsystem=N'CmdExec',&lt;br&gt;		@command=N'"d:\ApplicationDirectory\MyJobStep.bat"',&lt;br&gt;		@flags=0,&lt;br&gt;		@proxy_name=N'proxy_MyProxy'&lt;br&gt;&lt;/pre&gt;
&lt;p&gt;This may seem like a lot, but really it's not, and it ensures that the automation you're implementing is being done using the right context.&lt;/p&gt;
&lt;p&gt;Allen&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=Use a SQL Agent Proxy for Special Tasks&amp;amp;body=Seen on SQLblog.com: %0A%0A%09Use a SQL Agent Proxy for Special Tasks%0A%0Ahttp://sqlblog.com/blogs/allen_white/archive/2008/05/06/use-a-sql-agent-proxy-for-special-tasks.aspx" target="_blank" title = "Email Use a SQL Agent Proxy for Special Tasks"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://sqlblog.com/blogs/allen_white/archive/2008/05/06/use-a-sql-agent-proxy-for-special-tasks.aspx&amp;amp;title=Use+a+SQL+Agent+Proxy+for+Special+Tasks" target="_blank" title = "Submit Use a SQL Agent Proxy for Special Tasks to del.icio.us"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://sqlblog.com/blogs/allen_white/archive/2008/05/06/use-a-sql-agent-proxy-for-special-tasks.aspx&amp;amp;phase=2" target="_blank" title = "Submit Use a SQL Agent Proxy for Special Tasks to digg.com"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://sqlblog.com/blogs/allen_white/archive/2008/05/06/use-a-sql-agent-proxy-for-special-tasks.aspx&amp;amp;title=Use+a+SQL+Agent+Proxy+for+Special+Tasks" target="_blank" title = "Submit Use a SQL Agent Proxy for Special Tasks to reddit.com"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://sqlblog.com/blogs/allen_white/archive/2008/05/06/use-a-sql-agent-proxy-for-special-tasks.aspx&amp;amp;title=Use+a+SQL+Agent+Proxy+for+Special+Tasks" target="_blank" title = "Submit Use a SQL Agent Proxy for Special Tasks 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/allen_white/archive/2008/05/06/use-a-sql-agent-proxy-for-special-tasks.aspx&amp;amp;title=Use+a+SQL+Agent+Proxy+for+Special+Tasks&amp;amp;;top=1" target="_blank" title = "Add Use a SQL Agent Proxy for Special Tasks 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=6646" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/allen_white/archive/tags/Database+Administration/default.aspx">Database Administration</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>6</slash:comments><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/auditing/default.aspx">auditing</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/SQL+Server+2008/default.aspx">SQL Server 2008</category></item><item><title>SQL Server 2008 Page Compression: Using multiple processors</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2008/05/05/sql-server-2008-page-compression-using-multiple-processors.aspx</link><pubDate>Mon, 05 May 2008 13:59:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6627</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>6</slash:comments><description>&lt;P&gt;SQL Server 2008 has introduced a long sought after feature -- Data Compression. This is a great feature, and I have no doubt it'll be widely used. The key compression method is called page compression, which uses the following three techniques to reduce the space taken up by duplicates on a page: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Row compression. This technique changes the storage formats of many fixed-length datatypes (e.g. char, int, money, binary, datetime, and so on) so that they occupy only the required number of bytes plus a small overhead.&lt;/LI&gt;
&lt;LI&gt;Prefix compression. This technique finds duplicate prefixes on a page for each column , and replaces each duplicate with a small reference number.&lt;/LI&gt;
&lt;LI&gt;Dictionary compression. This technique finds duplicate values on a page, collects them into a dictionary stored after the page header but before the data rows, and replaces the duplicate values with their corresponding offsets in the dictionary.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;You can read more about SQL Server 2008 data compression in SQL2008 CTP6 Books Online. &lt;/P&gt;
&lt;P&gt;In this post, I'll focus on a very specific question: How does the number of processors impact rebuilding a table with page compression? Note that one way to enable page compression on a table is to rebuild it with the option data_compression set to page. The following is an example:&lt;/P&gt;
&lt;DIV style="BACKGROUND-COLOR:#cccccc;"&gt;ALTER TABLE customer REBUILD WITH (DATA_COMPRESSION=PAGE);&lt;/DIV&gt;
&lt;P&gt;Since compressing a table is a CPU intensive operation, one naturally would expect that using multiple processors should help reduce the elapsed time of the above command. How do you instruct SQL Server 2008 to take advantage of multiple processors? There exists another rebuild option called MAXDOP, which you can use to inform SQL Server of the max number of processors you want the rebuild to use. The following is an example of setting the MAXDOP option to 8:&lt;/P&gt;
&lt;DIV style="BACKGROUND-COLOR:#cccccc;"&gt;ALTER TABLE customer REBUILD WITH (DATA_COMPRESSION=PAGE, MAXDOP=8);&lt;/DIV&gt;
&lt;P&gt;To find out the impact of multiple processors (or the impact of setting MAXDOP to different values) on the elapsed time of the above command, I ran a series of t