<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>SQL Server Blogs - SQLTeam.com</title><link>http://weblogs.sqlteam.com/mainfeed2.aspx</link><description /><generator>Subtext Version 2.5.1.0</generator><item><title>New release of &amp;quot;OLAP PivotTable Extensions&amp;quot;</title><link>http://weblogs.sqlteam.com/lucaz/archive/2012/02/06/new-release-of-quotolap-pivottable-extensionsquot.aspx</link><pubDate>Mon, 06 Feb 2012 11:20:16 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/lucaz/archive/2012/02/06/new-release-of-quotolap-pivottable-extensionsquot.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/lucaz/comments/61400.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/lucaz/comments/commentRss/61400.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/lucaz/archive/2012/02/06/new-release-of-quotolap-pivottable-extensionsquot.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://weblogs.sqlteam.com/lucaz/services/trackbacks/61400.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/lucaz/rss.aspx">New release of &amp;quot;OLAP PivotTable Extensions&amp;quot;</source><description>&lt;p&gt;For those who are not familiar with this add-in, the &lt;em&gt;OLAP PivotTable Extensions &lt;/em&gt;add features of interest to Excel 2007 or 2010 PivotTables pointing to an OLAP cube in Analysis Services. One of these features I like very much, is to know the MDX query code associated with the pivot used at that time in Excel:&lt;/p&gt;  &lt;p&gt;&lt;img alt="AvgTaxMDX2.png" src="http://i3.codeplex.com/Download?ProjectName=OlapPivotTableExtend&amp;amp;DownloadId=287708" /&gt;&lt;/p&gt;  &lt;p&gt;You can find all the details here:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://olappivottableextend.codeplex.com/"&gt;http://olappivottableextend.codeplex.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It was recently released a new version of the add-in (version 0.7.4), which does not introduce any new features, but fixes a significant bug:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Release 0.7.4 now properly handles languages but introduces no new features. International users who run a different Windows language than their Excel UI language may be receiving an error message when they double click a cell and perform drillthrough which reads: "&lt;/em&gt;&lt;a href="http://olappivottableextend.codeplex.com/workitem/22100"&gt;&lt;em&gt;XML for Analysis parser: The LocaleIdentifier property is not overwritable and cannot be assigned a new value&lt;/em&gt;&lt;/a&gt;&lt;em&gt;". This error was caused by OLAP PivotTable Extensions in some situations, but release 0.7.4 fixes this problem.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Enjoy! &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/lucaz/Windows-Live-Writer/52fd7f98b01c_A4A4/wlEmoticon-smile_2.png" /&gt;&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/lucaz/aggbug/61400.aspx" width="1" height="1" /&gt;</description><dc:creator>Luca Zavarella</dc:creator></item><item><title>How to import in BIDS more than one SSIS package in one shot!</title><link>http://weblogs.sqlteam.com/lucaz/archive/2012/02/02/how-to-import-in-bids-more-than-one-ssis-package.aspx</link><pubDate>Thu, 02 Feb 2012 20:27:14 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/lucaz/archive/2012/02/02/how-to-import-in-bids-more-than-one-ssis-package.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/lucaz/comments/61399.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/lucaz/comments/commentRss/61399.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/lucaz/archive/2012/02/02/how-to-import-in-bids-more-than-one-ssis-package.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://weblogs.sqlteam.com/lucaz/services/trackbacks/61399.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/lucaz/rss.aspx">How to import in BIDS more than one SSIS package in one shot!</source><description>&lt;p&gt;Have you ever wanted to add more than one Integration Services existing package (e.g. 20 packages) in a SSIS project? Well, you may suppose that an Open Dialog supports multiple files selection to import more than one file at a time ...&lt;/p&gt;  &lt;p&gt;&lt;img src="https://lh3.googleusercontent.com/-HMFgzKOGxAE/TyavDLPAKhI/AAAAAAAAAYw/fxGGgQd5-xw/s640/AddSSISPackages_01.png" /&gt;&lt;/p&gt;  &lt;p&gt;BIDS Open Dialog doesn’t allow this, you can just select a single file! Hence the loss of valuable time spent to import the packages one at a time.&lt;/p&gt;  &lt;p&gt;Few days ago I learned a trick that solves the problem, thanks to &lt;a href="http://www.mattmasson.com/index.php/2012/01/ssis-quick-tip-copy-paste-packages-into-a-visual-studio-project/?utm_source=rss&amp;amp;utm_medium=rss&amp;amp;utm_campaign=ssis-quick-tip-copy-paste-packages-into-a-visual-studio-project" target="_blank"&gt;this post&lt;/a&gt; by &lt;strong&gt;Matt Masson&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Just copy all the packages to import from Windows Explorer (Ctrl + C):&lt;/p&gt;  &lt;p&gt;&lt;img style="margin: 0px 5px" src="https://lh4.googleusercontent.com/-zp3p_UGYHnI/TyavvOJNezI/AAAAAAAAAY8/n5mw-d8_Cs0/s837/AddSSISPackages_02.png" width="538" height="271" /&gt;&lt;/p&gt;  &lt;p&gt;Then just right click on the &lt;em&gt;SSIS Packages &lt;/em&gt;folder of the Integration Services project and make a simple &lt;em&gt;Past&lt;/em&gt; (CTRL + V):&lt;/p&gt;  &lt;p&gt;&lt;img src="https://lh3.googleusercontent.com/-WPXNDXCpf8E/Tya0UDwANqI/AAAAAAAAAZo/JPFQcd-xsTE/s341/AddSSISPackages_03.png" /&gt;&lt;/p&gt;  &lt;p&gt;So “auto-magically” you’ll have all those packages imported in your Integration Services project!!&lt;/p&gt;  &lt;p&gt;&lt;img src="https://lh6.googleusercontent.com/-NklM9wqE2Bo/Tya0UFY_chI/AAAAAAAAAZs/qcRZpWnl4do/s702/AddSSISPackages_04.png" /&gt;&lt;/p&gt;  &lt;p&gt;What can I say... this feature was well hidden! &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/lucaz/Windows-Live-Writer/ba1d7af04778_CFA3/wlEmoticon-smile_2.png" /&gt;&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/lucaz/aggbug/61399.aspx" width="1" height="1" /&gt;</description><dc:creator>Luca Zavarella</dc:creator></item><item><title>How to calculate the covariance in T-SQL</title><link>http://weblogs.sqlteam.com/peterl/archive/2012/01/18/how-to-calculate-the-covariance-in-t-sql.aspx</link><pubDate>Wed, 18 Jan 2012 12:01:46 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/peterl/archive/2012/01/18/how-to-calculate-the-covariance-in-t-sql.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/peterl/comments/61396.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/peterl/comments/commentRss/61396.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/peterl/archive/2012/01/18/how-to-calculate-the-covariance-in-t-sql.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://weblogs.sqlteam.com/peterl/services/trackbacks/61396.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/peterl/rss.aspx">How to calculate the covariance in T-SQL</source><description>&lt;div style="line-height: normal;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;DECLARE &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;@Sample &lt;span style="color: blue;"&gt;TABLE&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;        &lt;/span&gt;&lt;span style="color: gray; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;(&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;            x &lt;span style="color: blue;"&gt;INT&lt;/span&gt; &lt;span style="color: gray;"&gt;NOT&lt;/span&gt; &lt;span style="color: gray;"&gt;NULL,&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;            y &lt;span style="color: blue;"&gt;INT&lt;/span&gt; &lt;span style="color: gray;"&gt;NOT&lt;/span&gt; &lt;span style="color: gray;"&gt;NULL&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;        &lt;span style="color: gray;"&gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;INSERT&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;  @Sample&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;VALUES  &lt;/span&gt;&lt;span style="color: gray; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;(&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;3&lt;span style="color: gray;"&gt;,&lt;/span&gt; 9&lt;span style="color: gray;"&gt;),&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;        &lt;/span&gt;&lt;span style="color: gray; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;(&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;2&lt;span style="color: gray;"&gt;,&lt;/span&gt; 7&lt;span style="color: gray;"&gt;),&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;        &lt;/span&gt;&lt;span style="color: gray; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;(&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;4&lt;span style="color: gray;"&gt;,&lt;/span&gt; 12&lt;span style="color: gray;"&gt;),&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;        &lt;/span&gt;&lt;span style="color: gray; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;(&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;5&lt;span style="color: gray;"&gt;,&lt;/span&gt; 15&lt;span style="color: gray;"&gt;),&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;        &lt;/span&gt;&lt;span style="color: gray; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;(&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;6&lt;span style="color: gray;"&gt;,&lt;/span&gt; 17&lt;span style="color: gray;"&gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="color: gray; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;;&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;WITH&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt; cteSource&lt;span style="color: gray;"&gt;(&lt;/span&gt;x&lt;span style="color: gray;"&gt;,&lt;/span&gt; xAvg&lt;span style="color: gray;"&gt;,&lt;/span&gt; y&lt;span style="color: gray;"&gt;,&lt;/span&gt; yAvg&lt;span style="color: gray;"&gt;,&lt;/span&gt; n&lt;span style="color: gray;"&gt;)&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;AS &lt;/span&gt;&lt;span style="color: gray; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;(&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;        &lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;  1E &lt;span style="color: gray;"&gt;*&lt;/span&gt; x&lt;span style="color: gray;"&gt;,&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;                &lt;span style="color: fuchsia;"&gt;AVG&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;1E &lt;span style="color: gray;"&gt;*&lt;/span&gt; x&lt;span style="color: gray;"&gt;)&lt;/span&gt; &lt;span style="color: blue;"&gt;OVER &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;PARTITION&lt;/span&gt; &lt;span style="color: blue;"&gt;BY &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt; &lt;span style="color: gray;"&gt;NULL)),&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;                1E &lt;span style="color: gray;"&gt;*&lt;/span&gt; y&lt;span style="color: gray;"&gt;,&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;                &lt;span style="color: fuchsia;"&gt;AVG&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;1E &lt;span style="color: gray;"&gt;*&lt;/span&gt; y&lt;span style="color: gray;"&gt;)&lt;/span&gt; &lt;span style="color: blue;"&gt;OVER &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;PARTITION&lt;/span&gt; &lt;span style="color: blue;"&gt;BY &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt; &lt;span style="color: gray;"&gt;NULL)),&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;                &lt;span style="color: fuchsia;"&gt;COUNT&lt;/span&gt;&lt;span style="color: gray;"&gt;(*)&lt;/span&gt; &lt;span style="color: blue;"&gt;OVER &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;PARTITION&lt;/span&gt; &lt;span style="color: blue;"&gt;BY &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt; &lt;span style="color: gray;"&gt;NULL))&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;        &lt;span style="color: blue;"&gt;FROM&lt;/span&gt;    @Sample&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: gray; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;)&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;SELECT&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;  &lt;span style="color: fuchsia;"&gt;SUM&lt;/span&gt;&lt;span style="color: gray;"&gt;((&lt;/span&gt;x &lt;span style="color: gray;"&gt;-&lt;/span&gt; xAvg&lt;span style="color: gray;"&gt;)&lt;/span&gt; &lt;span style="color: gray;"&gt;*&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;y &lt;span style="color: gray;"&gt;-&lt;/span&gt; yAvg&lt;span style="color: gray;"&gt;))&lt;/span&gt; &lt;span style="color: gray;"&gt;/&lt;/span&gt; &lt;span style="color: fuchsia;"&gt;MAX&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;n&lt;span style="color: gray;"&gt;)&lt;/span&gt; &lt;span style="color: blue;"&gt;AS&lt;/span&gt; [COVAR(x,y)]&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: blue; line-height: 115%; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;FROM&lt;/span&gt;&lt;span style="line-height: 115%; font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt;"&gt;    cteSource&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;img src="http://weblogs.sqlteam.com/peterl/aggbug/61396.aspx" width="1" height="1" /&gt;</description><dc:creator>Peter Larsson</dc:creator></item><item><title>So long and thanks for the fish&amp;hellip;</title><link>http://weblogs.sqlteam.com/geoffh/archive/2011/12/28/so-long-and-thanks-for-the-fishhellip.aspx</link><pubDate>Wed, 28 Dec 2011 21:03:53 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/geoffh/archive/2011/12/28/so-long-and-thanks-for-the-fishhellip.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/geoffh/comments/61395.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/geoffh/comments/commentRss/61395.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/geoffh/archive/2011/12/28/so-long-and-thanks-for-the-fishhellip.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://weblogs.sqlteam.com/geoffh/services/trackbacks/61395.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/geoffh/rss.aspx">So long and thanks for the fish&amp;hellip;</source><description>&lt;p&gt;This marks my last post as a SQLPASS Board member.  I learned a lot during my year of service and I thank everyone involved for this opportunity.  I would especially like to thank the Chapter leaders and Regional Mentors for Virtual Chapters who (mostly) patiently taught me about Virtual Chapters.   I hope the changes I put in place will help strengthen and grow VCs and PASS going forward.  I would also like to thank every one who encouraged me to reach beyond my comfort zone and accept a leadership position within the PASS organization.  &lt;/p&gt;
&lt;p&gt;My overall principle was to be a good steward of the PASS community.  Could I have done more?  Always. Did I do enough?  I hope so.  But PASS is a volunteer organization and my time, like yours, is limited.  I have other obligations in life that supersede PASS.  Now I have more time for some of those.  I won’t be going away or leaving the SQL Community.  I will still contribute to the community and support PASS, just in a different role.  Time to let somebody else enjoy the hot seat for a while.&lt;/p&gt;
&lt;p&gt;Finally, everyone who voted (not just for me) deserves a thanks.  More voters and more engaged voters, strong candidates, and a vigorous debate were all I wanted out of declaring as a candidate last year. This year the SQL community got exactly that. &lt;/p&gt;
&lt;p&gt;Thank you.. &lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/geoffh/aggbug/61395.aspx" width="1" height="1" /&gt;</description><dc:creator>Geoff N. Hiten</dc:creator></item><item><title>Broken Views</title><link>http://weblogs.sqlteam.com/markc/archive/2011/12/26/broken-views.aspx</link><pubDate>Tue, 27 Dec 2011 07:16:30 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/markc/archive/2011/12/26/broken-views.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/markc/comments/61394.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/markc/comments/commentRss/61394.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/markc/archive/2011/12/26/broken-views.aspx#comment</comments><slash:comments>1</slash:comments><trackback:ping>http://weblogs.sqlteam.com/markc/services/trackbacks/61394.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/markc/rss.aspx">Broken Views</source><description>&lt;p&gt;“SELECT *” isn’t just hazardous to performance, it can actually return blatantly wrong information.&lt;/p&gt;  &lt;p&gt;There are a number of blog posts and articles out there that actively discourage the use of the &lt;em&gt;SELECT * FROM …&lt;/em&gt;syntax.  The two most common explanations that I have seen are:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Performance&lt;/strong&gt;:  The &lt;em&gt;SELECT *&lt;/em&gt; syntax will return every column in the table, but frequently you really only need a few of the columns, and so by using &lt;em&gt;SELECT *&lt;/em&gt; your are retrieving large volumes of data that you don’t need, but the system has to process, marshal across tiers, and so on.  It would be much more efficient to only select the specific columns that you need. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Future-proof&lt;/strong&gt;:  If you are taking other shortcuts in your code, along with using &lt;em&gt;SELECT *&lt;/em&gt;, you are setting yourself up for trouble down the road when enhancements are made to the system.  For example, if you use &lt;em&gt;SELECT *&lt;/em&gt; to return results from a table into a DataTable in .NET, and then reference columns positionally (e.g. myDataRow[5]) you could end up with bad data if someone happens to add a column into position 3 and skewing all the remaining columns’ ordinal position.  Or if you use &lt;em&gt;INSERT…SELECT *&lt;/em&gt; then you will likely run into errors when a new column is added to the source table in any position. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;And if you use &lt;em&gt;SELECT *&lt;/em&gt; in the definition of a view, you will run into a variation of the future-proof problem mentioned above.  One of the guys on my team, Mike Byther, ran across this in a project we were doing, but fortunately he caught it while we were still in development.  I asked him to put together a test to prove that this was related to the use of &lt;em&gt;SELECT *&lt;/em&gt; and not some other anomaly.  I’ll walk you through the test script so you can see for yourself what happens.&lt;/p&gt;  &lt;p&gt;We are going to create a table and two views that are based on that table, one of them uses &lt;em&gt;SELECT *&lt;/em&gt; and the other explicitly lists the column names.  The script to create these objects is listed below.&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;IF&lt;/span&gt; OBJECT_ID(&lt;span style="color: #006080"&gt;'testtab'&lt;/span&gt;) &lt;span style="color: #0000ff"&gt;IS&lt;/span&gt; &lt;span style="color: #0000ff"&gt;NOT&lt;/span&gt; &lt;span style="color: #0000ff"&gt;NULL&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #0000ff"&gt;DROP&lt;/span&gt; &lt;span style="color: #0000ff"&gt;TABLE&lt;/span&gt; testtab&lt;br /&gt;&lt;span style="color: #0000ff"&gt;go&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;IF&lt;/span&gt; OBJECT_ID(&lt;span style="color: #006080"&gt;'testtab_vw'&lt;/span&gt;) &lt;span style="color: #0000ff"&gt;IS&lt;/span&gt; &lt;span style="color: #0000ff"&gt;NOT&lt;/span&gt; &lt;span style="color: #0000ff"&gt;NULL&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #0000ff"&gt;DROP&lt;/span&gt; &lt;span style="color: #0000ff"&gt;VIEW&lt;/span&gt; testtab_vw&lt;br /&gt;&lt;span style="color: #0000ff"&gt;go&lt;/span&gt;   &lt;br /&gt;&lt;span style="color: #0000ff"&gt;IF&lt;/span&gt; OBJECT_ID(&lt;span style="color: #006080"&gt;'testtab_vw_named'&lt;/span&gt;) &lt;span style="color: #0000ff"&gt;IS&lt;/span&gt; &lt;span style="color: #0000ff"&gt;NOT&lt;/span&gt; &lt;span style="color: #0000ff"&gt;NULL&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #0000ff"&gt;DROP&lt;/span&gt; &lt;span style="color: #0000ff"&gt;VIEW&lt;/span&gt; testtab_vw_named&lt;br /&gt;&lt;span style="color: #0000ff"&gt;go&lt;/span&gt;   &lt;br /&gt;&lt;span style="color: #0000ff"&gt;CREATE&lt;/span&gt; &lt;span style="color: #0000ff"&gt;TABLE&lt;/span&gt; testtab (col1 NVARCHAR(5) &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;, col2 NVARCHAR(5) &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;br /&gt;INSERT &lt;span style="color: #0000ff"&gt;INTO&lt;/span&gt; testtab(col1, col2)&lt;br /&gt;&lt;span style="color: #0000ff"&gt;VALUES&lt;/span&gt; (&lt;span style="color: #006080"&gt;'A'&lt;/span&gt;,&lt;span style="color: #006080"&gt;'B'&lt;/span&gt;), (&lt;span style="color: #006080"&gt;'A'&lt;/span&gt;,&lt;span style="color: #006080"&gt;'B'&lt;/span&gt;)&lt;br /&gt;&lt;span style="color: #0000ff"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;CREATE&lt;/span&gt; &lt;span style="color: #0000ff"&gt;VIEW&lt;/span&gt; testtab_vw &lt;span style="color: #0000ff"&gt;AS&lt;/span&gt; &lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; * &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; testtab&lt;br /&gt;&lt;span style="color: #0000ff"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;CREATE&lt;/span&gt; &lt;span style="color: #0000ff"&gt;VIEW&lt;/span&gt; testtab_vw_named &lt;span style="color: #0000ff"&gt;AS&lt;/span&gt; &lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; col1, col2 &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; testtab&lt;br /&gt;&lt;span style="color: #0000ff"&gt;go&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Now, to prove that the two views currently return equivalent results, select from them.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; &lt;span style="color: #006080"&gt;'star'&lt;/span&gt;, col1, col2 &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; testtab_vw&lt;br /&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; &lt;span style="color: #006080"&gt;'named'&lt;/span&gt;, col1, col2 &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; testtab_vw_named&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;OK, so far, so good.  Now, what happens if someone makes a change to the definition of the underlying table, and that change results in a new column being inserted between the two existing columns?  (Side note, I normally prefer to append new columns to the end of the table definition, but some people like to keep their columns alphabetized, and for clarity for later people reviewing the schema, it may make sense to group certain columns together.  Whatever the reason, it sometimes happens, and you need to protect yourself and your code from the repercussions.)&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;DROP&lt;/span&gt; &lt;span style="color: #0000ff"&gt;TABLE&lt;/span&gt; testtab&lt;br /&gt;&lt;span style="color: #0000ff"&gt;go&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;CREATE&lt;/span&gt; &lt;span style="color: #0000ff"&gt;TABLE&lt;/span&gt; testtab (col1 NVARCHAR(5) &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;, col3 NVARCHAR(5) &lt;span style="color: #0000ff"&gt;NULL&lt;/span&gt;, col2 NVARCHAR(5) &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;br /&gt;INSERT &lt;span style="color: #0000ff"&gt;INTO&lt;/span&gt; testtab(col1, col3, col2)&lt;br /&gt;&lt;span style="color: #0000ff"&gt;VALUES&lt;/span&gt; (&lt;span style="color: #006080"&gt;'A'&lt;/span&gt;,&lt;span style="color: #006080"&gt;'C'&lt;/span&gt;,&lt;span style="color: #006080"&gt;'B'&lt;/span&gt;), (&lt;span style="color: #006080"&gt;'A'&lt;/span&gt;,&lt;span style="color: #006080"&gt;'C'&lt;/span&gt;,&lt;span style="color: #006080"&gt;'B'&lt;/span&gt;)&lt;br /&gt;&lt;span style="color: #0000ff"&gt;go&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; &lt;span style="color: #006080"&gt;'star'&lt;/span&gt;, col1, col2 &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; testtab_vw&lt;br /&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; &lt;span style="color: #006080"&gt;'named'&lt;/span&gt;, col1, col2 &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; testtab_vw_named&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;I would have expected that the view using &lt;em&gt;SELECT *&lt;/em&gt; in its definition would essentially pass-through the column name and still retrieve the correct data, but that is not what happens.  When you run our two select statements again, you see that the View that is based on &lt;em&gt;SELECT *&lt;/em&gt; actually retrieves the data based on the ordinal position of the columns &lt;strong&gt;at the time that the view was created&lt;/strong&gt;.  Sure, one work-around is to recreate the View, but you can’t really count on other developers to know the dependencies you have built-in, and they won’t necessarily recreate the view when they refactor the table.&lt;/p&gt;

&lt;p&gt;I am sure that there are reasons and justifications for why Views behave this way, but I find it particularly disturbing that you can have code asking for col2, but actually be receiving data from col3.  By the way, for the record, this entire scenario and accompanying test script apply to SQL Server 2008 R2 with Service Pack 1.&lt;/p&gt;

&lt;p&gt;So, let the developer beware…know what assumptions are in effect around your code, and keep on discouraging people from using SELECT * syntax in anything but the simplest of ad-hoc queries.&lt;/p&gt;

&lt;p&gt;And of course, let’s clean up after ourselves.  To eliminate the database objects created during this test, run the following commands.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;DROP&lt;/span&gt; &lt;span style="color: #0000ff"&gt;TABLE&lt;/span&gt; testtab&lt;br /&gt;&lt;span style="color: #0000ff"&gt;DROP&lt;/span&gt; &lt;span style="color: #0000ff"&gt;VIEW&lt;/span&gt; testtab_vw&lt;br /&gt;&lt;span style="color: #0000ff"&gt;DROP&lt;/span&gt; &lt;span style="color: #0000ff"&gt;VIEW&lt;/span&gt; testtab_vw_named&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;&lt;img src="http://weblogs.sqlteam.com/markc/aggbug/61394.aspx" width="1" height="1" /&gt;</description><dc:creator>Ajarn Mark Caldwell</dc:creator></item><item><title>T-SQL Tuesday #025 &amp;ndash; CHECK Constraint Tricks</title><link>http://weblogs.sqlteam.com/robv/archive/2011/12/13/t-sql-tuesday-025-ndash-check-constraint-tricks.aspx</link><pubDate>Tue, 13 Dec 2011 19:24:28 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/robv/archive/2011/12/13/t-sql-tuesday-025-ndash-check-constraint-tricks.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/robv/comments/61393.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/robv/comments/commentRss/61393.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/robv/archive/2011/12/13/t-sql-tuesday-025-ndash-check-constraint-tricks.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://weblogs.sqlteam.com/robv/services/trackbacks/61393.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/robv/rss.aspx">T-SQL Tuesday #025 &amp;ndash; CHECK Constraint Tricks</source><description>&lt;p&gt;&lt;a target="_blank" href="http://sqlblog.com/blogs/allen_white/archive/2011/12/05/t-sql-tuesday-025-invitation-to-share-your-tricks.aspx"&gt;&lt;img style="FLOAT: left" alt="" src="http://www.upsearch.com/components/com_wordpress/wp/wp-content/uploads/2011/12/tsqltuesday.jpg" /&gt;&lt;/a&gt;Allen White (&lt;a target="_blank" href="http://sqlblog.com/blogs/allen_white/default.aspx"&gt;blog&lt;/a&gt; | &lt;a target="_blank" href="https://twitter.com/#!/SQLRunr"&gt;twitter&lt;/a&gt;), marathoner, SQL Server MVP and presenter, and all-around &lt;a title="MVP Deep Dives, Chapter 27" target="_blank" href="http://www.amazon.com/SQL-Server-MVP-Deep-Dives/dp/1935182048/ref=pd_sim_b_1"&gt;awesome author&lt;/a&gt; is hosting this month's &lt;a target="_blank" href="http://sqlblog.com/blogs/allen_white/archive/2011/12/05/t-sql-tuesday-025-invitation-to-share-your-tricks.aspx"&gt;T-SQL Tuesday on sharing SQL Server Tips and Tricks&lt;/a&gt;.  And for those of you who have attended my &lt;em&gt;Revenge: The SQL&lt;/em&gt; presentation, you know that I have 1 or 2 of them.  You'll also know that I don't recommend using anything I talk about in a production system, and will continue that advice here…although you might be sorely tempted.  Suffice it to say I'm not using these examples myself, but I think they're worth sharing anyway.&lt;/p&gt;
&lt;p&gt;Some of you have seen or read about &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/ms189862.aspx"&gt;SQL Server constraints&lt;/a&gt; and have &lt;a title="Yeah Matt! Matt uses constraints! If you're a vendor, hire this guy!" target="_blank" href="http://mattvelic.com/tsql-tuesday-25/"&gt;applied them to your table designs&lt;/a&gt;…unless you're a vendor ;)…and may even use CHECK constraints to limit numeric values, or length of strings, allowable characters and such.  CHECK constraints can, however, do more than that, and can even provide enhanced security and other restrictions.&lt;/p&gt;
&lt;p&gt;One tip or trick that I didn't cover very well in the presentation is using constraints to do unusual things; specifically, limiting or preventing inserts into tables.  The idea was to use a CHECK constraint in a way that didn't depend on the actual data:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="COLOR: green"&gt;-- create a table that cannot accept data
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;CREATE TABLE &lt;/span&gt;dbo&lt;span style="COLOR: gray"&gt;.&lt;/span&gt;JustTryIt&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;a &lt;span style="COLOR: blue"&gt;BIT &lt;/span&gt;&lt;span style="COLOR: gray"&gt;NOT NULL &lt;/span&gt;&lt;span style="COLOR: blue"&gt;PRIMARY KEY&lt;/span&gt;&lt;span style="COLOR: gray"&gt;,
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;CONSTRAINT &lt;/span&gt;chk_no_insert &lt;span style="COLOR: blue"&gt;CHECK &lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;&lt;span style="COLOR: magenta"&gt;GETDATE&lt;/span&gt;&lt;span style="COLOR: gray"&gt;()=&lt;/span&gt;&lt;span style="COLOR: magenta"&gt;GETDATE&lt;/span&gt;&lt;span style="COLOR: gray"&gt;()+&lt;/span&gt;1&lt;span style="COLOR: gray"&gt;))

&lt;/span&gt;&lt;span style="COLOR: blue"&gt;INSERT &lt;/span&gt;dbo&lt;span style="COLOR: gray"&gt;.&lt;/span&gt;JustTryIt &lt;span style="COLOR: blue"&gt;VALUES&lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;1&lt;span style="COLOR: gray"&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I'll let you run that yourself, but I'm sure you'll see that this is a pretty stupid table to have, since the CHECK condition will always be false, and therefore will prevent any data from ever being inserted.  I can't remember why I used this example but it was for some vague and esoteric purpose that applies to about, maybe, zero people.  I come up with a lot of examples like that.&lt;/p&gt;
&lt;p&gt;However, if you realize that these CHECKs are not limited to column references, and if you explore the &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/ms174318.aspx"&gt;SQL Server function list&lt;/a&gt;, you could come up with a few that might be useful.  I'll let the names describe what they do instead of explaining them all:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="COLOR: blue"&gt;CREATE TABLE &lt;/span&gt;NoSA&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;a &lt;span style="COLOR: blue"&gt;int &lt;/span&gt;&lt;span style="COLOR: gray"&gt;not null, 
    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;CONSTRAINT &lt;/span&gt;CHK_No_sa &lt;span style="COLOR: blue"&gt;CHECK &lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;&lt;span style="COLOR: magenta"&gt;SUSER_SNAME&lt;/span&gt;&lt;span style="COLOR: gray"&gt;()&amp;lt;&amp;gt;&lt;/span&gt;&lt;span style="COLOR: red"&gt;'sa'&lt;/span&gt;&lt;span style="COLOR: gray"&gt;))

&lt;/span&gt;&lt;span style="COLOR: blue"&gt;CREATE TABLE &lt;/span&gt;NoSysAdmin&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;a &lt;span style="COLOR: blue"&gt;int &lt;/span&gt;&lt;span style="COLOR: gray"&gt;not null, 
    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;CONSTRAINT &lt;/span&gt;CHK_No_sysadmin &lt;span style="COLOR: blue"&gt;CHECK &lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;&lt;span style="COLOR: magenta"&gt;IS_SRVROLEMEMBER&lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;&lt;span style="COLOR: red"&gt;'sysadmin'&lt;/span&gt;&lt;span style="COLOR: gray"&gt;)=&lt;/span&gt;0&lt;span style="COLOR: gray"&gt;))

&lt;/span&gt;&lt;span style="COLOR: blue"&gt;CREATE TABLE &lt;/span&gt;NoAdHoc&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;a &lt;span style="COLOR: blue"&gt;int &lt;/span&gt;&lt;span style="COLOR: gray"&gt;not null, 
    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;CONSTRAINT &lt;/span&gt;CHK_No_AdHoc &lt;span style="COLOR: blue"&gt;CHECK &lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;&lt;span style="COLOR: magenta"&gt;OBJECT_NAME&lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;&lt;span style="COLOR: magenta"&gt;@@PROCID&lt;/span&gt;&lt;span style="COLOR: gray"&gt;) IS NOT NULL))

&lt;/span&gt;&lt;span style="COLOR: blue"&gt;CREATE TABLE &lt;/span&gt;NoAdHoc2&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;a &lt;span style="COLOR: blue"&gt;int &lt;/span&gt;&lt;span style="COLOR: gray"&gt;not null, 
    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;CONSTRAINT &lt;/span&gt;CHK_No_AdHoc2 &lt;span style="COLOR: blue"&gt;CHECK &lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;&lt;span style="COLOR: magenta"&gt;@@NESTLEVEL&lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;gt;&lt;/span&gt;0&lt;span style="COLOR: gray"&gt;))

&lt;/span&gt;&lt;span style="COLOR: blue"&gt;CREATE TABLE &lt;/span&gt;NoCursors&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;a &lt;span style="COLOR: blue"&gt;int &lt;/span&gt;&lt;span style="COLOR: gray"&gt;not null, 
    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;CONSTRAINT &lt;/span&gt;CHK_No_Cursors &lt;span style="COLOR: blue"&gt;CHECK &lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;&lt;span style="COLOR: magenta"&gt;@@CURSOR_ROWS&lt;/span&gt;&lt;span style="COLOR: gray"&gt;=&lt;/span&gt;0&lt;span style="COLOR: gray"&gt;))

&lt;/span&gt;&lt;span style="COLOR: blue"&gt;CREATE TABLE &lt;/span&gt;ANSI_PADDING_ON&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;a &lt;span style="COLOR: blue"&gt;int &lt;/span&gt;&lt;span style="COLOR: gray"&gt;not null, 
    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;CONSTRAINT &lt;/span&gt;CHK_ANSI_PADDING_ON &lt;span style="COLOR: blue"&gt;CHECK &lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;&lt;span style="COLOR: magenta"&gt;@@OPTIONS &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;amp; &lt;/span&gt;16&lt;span style="COLOR: gray"&gt;=&lt;/span&gt;16&lt;span style="COLOR: gray"&gt;))

&lt;/span&gt;&lt;span style="COLOR: blue"&gt;CREATE TABLE &lt;/span&gt;TimeOfDay&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;a &lt;span style="COLOR: blue"&gt;int &lt;/span&gt;&lt;span style="COLOR: gray"&gt;not null, 
    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;CONSTRAINT &lt;/span&gt;CHK_TimeOfDay &lt;span style="COLOR: blue"&gt;CHECK &lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;&lt;span style="COLOR: magenta"&gt;DATEPART&lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;&lt;span style="COLOR: blue"&gt;hour&lt;/span&gt;&lt;span style="COLOR: gray"&gt;,&lt;/span&gt;&lt;span style="COLOR: magenta"&gt;GETDATE&lt;/span&gt;&lt;span style="COLOR: gray"&gt;()) BETWEEN &lt;/span&gt;0 &lt;span style="COLOR: gray"&gt;AND &lt;/span&gt;1&lt;span style="COLOR: gray"&gt;))
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;GO

&lt;/span&gt;&lt;span style="COLOR: green"&gt;-- log in as sa or a sysadmin server role member, and try this:
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;INSERT &lt;/span&gt;NoSA &lt;span style="COLOR: blue"&gt;VALUES&lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;1&lt;span style="COLOR: gray"&gt;)
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;INSERT &lt;/span&gt;NoSysAdmin &lt;span style="COLOR: blue"&gt;VALUES&lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;1&lt;span style="COLOR: gray"&gt;)
&lt;/span&gt;&lt;span style="COLOR: green"&gt;-- note the difference when using sa vs. non-sa
-- then try it again with a non-sysadmin login

-- see if this works:
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;INSERT &lt;/span&gt;NoAdHoc &lt;span style="COLOR: blue"&gt;VALUES&lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;1&lt;span style="COLOR: gray"&gt;)
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;INSERT &lt;/span&gt;NoAdHoc2 &lt;span style="COLOR: blue"&gt;VALUES&lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;1&lt;span style="COLOR: gray"&gt;)
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;GO

&lt;/span&gt;&lt;span style="COLOR: green"&gt;-- then try this:
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;CREATE PROCEDURE &lt;/span&gt;NotAdHoc @val1 &lt;span style="COLOR: blue"&gt;int&lt;/span&gt;&lt;span style="COLOR: gray"&gt;, &lt;/span&gt;@val2 &lt;span style="COLOR: blue"&gt;int AS
SET NOCOUNT ON&lt;/span&gt;&lt;span style="COLOR: gray"&gt;;
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;INSERT &lt;/span&gt;NoAdHoc &lt;span style="COLOR: blue"&gt;VALUES&lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;@val1&lt;span style="COLOR: gray"&gt;)
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;INSERT &lt;/span&gt;NoAdHoc2 &lt;span style="COLOR: blue"&gt;VALUES&lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;@val2&lt;span style="COLOR: gray"&gt;)
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;GO

EXEC &lt;/span&gt;NotAdHoc 2&lt;span style="COLOR: gray"&gt;,&lt;/span&gt;2

&lt;span style="COLOR: green"&gt;-- which values got inserted?
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;SELECT &lt;/span&gt;&lt;span style="COLOR: gray"&gt;* &lt;/span&gt;&lt;span style="COLOR: blue"&gt;FROM &lt;/span&gt;NoAdHoc
&lt;span style="COLOR: blue"&gt;SELECT &lt;/span&gt;&lt;span style="COLOR: gray"&gt;* &lt;/span&gt;&lt;span style="COLOR: blue"&gt;FROM &lt;/span&gt;NoAdHoc2&lt;/pre&gt;
&lt;pre class="code"&gt; &lt;/pre&gt;
&lt;pre class="code"&gt;&lt;span style="COLOR: green" /&gt;&lt;/pre&gt;
&lt;pre class="code"&gt;&lt;span style="COLOR: green"&gt;-- and this one just makes me happy :)
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;INSERT &lt;/span&gt;NoCursors &lt;span style="COLOR: blue"&gt;VALUES&lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;1&lt;span style="COLOR: gray"&gt;)
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;DECLARE &lt;/span&gt;curs &lt;span style="COLOR: blue"&gt;CURSOR FOR SELECT &lt;/span&gt;1
&lt;span style="COLOR: blue"&gt;OPEN &lt;/span&gt;curs
&lt;span style="COLOR: blue"&gt;INSERT &lt;/span&gt;NoCursors &lt;span style="COLOR: blue"&gt;VALUES&lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;2&lt;span style="COLOR: gray"&gt;)
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;CLOSE &lt;/span&gt;curs
&lt;span style="COLOR: blue"&gt;DEALLOCATE &lt;/span&gt;curs
&lt;span style="COLOR: blue"&gt;INSERT &lt;/span&gt;NoCursors &lt;span style="COLOR: blue"&gt;VALUES&lt;/span&gt;&lt;span style="COLOR: gray"&gt;(&lt;/span&gt;3&lt;span style="COLOR: gray"&gt;)

&lt;/span&gt;&lt;span style="COLOR: blue"&gt;SELECT &lt;/span&gt;&lt;span style="COLOR: gray"&gt;* &lt;/span&gt;&lt;span style="COLOR: blue"&gt;FROM &lt;/span&gt;NoCursors&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I'll leave the ANSI_PADDING_ON and TimeOfDay tables for you to test on your own, I think you get the idea.  (Also take a look at the NoCursors example, notice anything interesting?)  &lt;/p&gt;
&lt;p&gt;The real eye-opener, for me anyway, is the ability to limit bad coding practices like cursors, ad-hoc SQL, and sa use/abuse by using declarative SQL objects.  I'm sure you can see how and why this would come up when discussing &lt;em&gt;Revenge: The SQL.&lt;/em&gt;;) And the best part IMHO is that these work on pretty much any version of SQL Server, without needing Policy Based Management, DDL/login triggers, or similar tools to enforce best practices.&lt;/p&gt;
&lt;p&gt;All seriousness aside, I highly recommend that you spend some time letting your mind go wild with the possibilities and see how far you can take things.  There are no rules!&lt;/p&gt;
&lt;p&gt;(Hmmmm, what can I do with &lt;a title="Still works in SQL 2012!" target="_blank" href="http://msdn.microsoft.com/en-us/library/ms188064.aspx"&gt;rules&lt;/a&gt;?)&lt;/p&gt;
&lt;p&gt;#TSQL2sDay&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/robv/aggbug/61393.aspx" width="1" height="1" /&gt;</description><dc:creator>Most Valuable Yak (Rob Volk)</dc:creator></item><item><title>Let&amp;rsquo;s keep informed with &amp;ldquo;Data Explorer&amp;rdquo;</title><link>http://weblogs.sqlteam.com/lucaz/archive/2011/12/10/letrsquos-keep-informed-with-ldquodata-explorerrdquo.aspx</link><pubDate>Sat, 10 Dec 2011 12:39:20 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/lucaz/archive/2011/12/10/letrsquos-keep-informed-with-ldquodata-explorerrdquo.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/lucaz/comments/61392.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/lucaz/comments/commentRss/61392.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/lucaz/archive/2011/12/10/letrsquos-keep-informed-with-ldquodata-explorerrdquo.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://weblogs.sqlteam.com/lucaz/services/trackbacks/61392.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/lucaz/rss.aspx">Let&amp;rsquo;s keep informed with &amp;ldquo;Data Explorer&amp;rdquo;</source><description>&lt;p&gt;At Pass Summit 2011 a new project was announced. It’s a &lt;em&gt;Microsoft SQL Azure Lab&lt;/em&gt; and its codename is &lt;strong&gt;Microsoft “Data Explorer”&lt;/strong&gt;. According to the official blog (&lt;a href="http://blogs.msdn.com/b/dataexplorer/"&gt;http://blogs.msdn.com/b/dataexplorer/&lt;/a&gt;), this new tool provides an innovative way to acquire new knowledge from the data that interest you. In a nutshell, &lt;em&gt;Data Explorer&lt;/em&gt; allows you to combine data from multiple sources, to publish and share the result. In addition, you can generate data streams in the &lt;em&gt;RESTful&lt;/em&gt; open format (&lt;a href="http://www.odata.org/" target="_blank"&gt;Open Data Protocol&lt;/a&gt;), and they can then be used by other applications. Nonetheless we can still use Excel or PowerPivot to analyze the results.&lt;/p&gt;  &lt;p&gt;Sources can be varied: Excel spreadsheets, text files, databases, &lt;strong&gt;Windows Azure Marketplace&lt;/strong&gt;, etc.. For those who are not familiar with this resource, I strongly suggest you to keep an eye on the data services available to the Marketplace:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://datamarket.azure.com/browse/Data"&gt;https://datamarket.azure.com/browse/Data&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To tell the truth, as I read the above blog post, I was tempted to think of the &lt;em&gt;Data Explorer&lt;/em&gt; as a "SSIS on Azure" addressed to the Power User. In fact, reading the response from Tim Mallalieu (Group Program Manager of &lt;em&gt;Data Explorer&lt;/em&gt;) to the comment made to his &lt;a href="http://blogs.msdn.com/b/timmall/archive/2011/10/17/early-walkthrough-of-the-montego-client.aspx" target="_blank"&gt;post&lt;/a&gt;, I had a positive response to my first impression:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“…we originally thinking of ourselves as Self-Service ETL. As we talked to more folks and started partnering with other teams we realized that would be an area that we can add value but that there were more opportunities emerging.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The typical operations of the ETL phase ( processing and organization of data in different formats) can be obtained thanks to &lt;a href="http://blogs.msdn.com/b/dataexplorer/archive/2011/10/26/data-explorer-mashup-101.aspx" target="_blank"&gt;Data Explorer Mashup&lt;/a&gt;. This is an image of the tool:&lt;/p&gt;  &lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-48-46-metablogapi/7450.image_5F00_4D853984.png" width="529" height="225" /&gt;&lt;/p&gt;  &lt;p&gt;The flexibility in the manipulation of information is given by &lt;em&gt;&lt;a href="http://blogs.msdn.com/b/dataexplorer/archive/2011/11/17/the-data-explorer-formula-language.aspx" target="_blank"&gt;Data Explorer Formula Language&lt;/a&gt;&lt;/em&gt;. This is a formula-based Excel-style specific language:&lt;/p&gt;  &lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-48-46-Formula+Language+Series-Post+1/7024.7.png" /&gt;&lt;/p&gt;  &lt;p&gt;Anyone wishing to know more can check the project page in addition to aforementioned blog:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/en-us/sqlazurelabs/labs/dataexplorer.aspx"&gt;http://www.microsoft.com/en-us/sqlazurelabs/labs/dataexplorer.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In light of this new project, there is no doubt about the intention of Microsoft to get closer and closer to the Power User, providing him flexible and very easy to use tools for data analysis. The prime example of this is &lt;em&gt;PowerPivot&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;The question that remains is always the same: having in a company more Power User will implicitly mean having different data models representing the same reality. But this would inevitably lead to anarchical data management... What do you think about that?&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/lucaz/aggbug/61392.aspx" width="1" height="1" /&gt;</description><dc:creator>Luca Zavarella</dc:creator></item><item><title>SSMS Tools Pack 2.1.0 is out. Added support for SQL Server 2012 RC0.</title><link>http://weblogs.sqlteam.com/mladenp/archive/2011/12/01/ssms-tools-pack-2-1-0-is-out-added-support.aspx</link><pubDate>Thu, 01 Dec 2011 19:34:18 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/mladenp/archive/2011/12/01/ssms-tools-pack-2-1-0-is-out-added-support.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/mladenp/comments/61391.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/mladenp/comments/commentRss/61391.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/mladenp/archive/2011/12/01/ssms-tools-pack-2-1-0-is-out-added-support.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://weblogs.sqlteam.com/mladenp/services/trackbacks/61391.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/mladenp/rss.aspx">SSMS Tools Pack 2.1.0 is out. Added support for SQL Server 2012 RC0.</source><description>&lt;p&gt;This version adds support for SQL Server 2012 RC0 and fixes a few bugs with SQL History.&lt;/p&gt;  &lt;p&gt;Because of the support for regions in SSMS 2012 the regions and debug sections feature has been removed from SSMS Tools Pack for SQL Server 2012.&lt;/p&gt;  &lt;p&gt;The feature is still available for previous SSMS versions.&lt;/p&gt;  &lt;p&gt;In other news &lt;a href="http://www.ssmstoolspack.com/"&gt;&lt;strong&gt;SSMS Tools Pack&lt;/strong&gt;&lt;/a&gt; has won the SQL Magazine bronze award for best free tool of 2011. You can view all the details at the &lt;a href="http://www.sqlmag.com/content1/topic/2011-sql-server-magazine-editors-community-choice-awards-140830/catpath/awards/showprivate/1/page/9"&gt;&lt;strong&gt;SQL Server Magazine Award page&lt;/strong&gt;&lt;/a&gt;.    &lt;br /&gt;    &lt;br /&gt;Thanx to all the people who voted for it. I'm glad you all like it and use it with great success. &lt;/p&gt;  &lt;p&gt;Also I've added a possibility for you to subscribe to email notifications in case the auto-updater doesn't work for you for some reason like being behind a proxy.&lt;/p&gt;  &lt;p&gt;Enjoy it!&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/mladenp/aggbug/61391.aspx" width="1" height="1" /&gt;</description><dc:creator>Mladen Prajdić</dc:creator></item><item><title>Speaking in Omaha: December 7, 2011</title><link>http://weblogs.sqlteam.com/billg/archive/2011/12/01/speaking-in-omaha-december-7-2011.aspx</link><pubDate>Thu, 01 Dec 2011 16:30:45 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/billg/archive/2011/12/01/speaking-in-omaha-december-7-2011.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/billg/comments/61390.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/billg/comments/commentRss/61390.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/billg/archive/2011/12/01/speaking-in-omaha-december-7-2011.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://weblogs.sqlteam.com/billg/services/trackbacks/61390.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/billg/rss.aspx">Speaking in Omaha: December 7, 2011</source><description>&lt;p&gt;I’m presenting in Omaha on Writing Faster SQL at 6PM on December 7th.  You can find meeting details on the &lt;a href="http://www.omahamtg.com/Events.aspx?ID=138"&gt;Omaha SQL Server User Group&lt;/a&gt; page. The meeting location requires an RSVP so building security has a list of attendees.&lt;/p&gt;  &lt;p&gt;The presentation is a series of suggestions on improving performance.  It ranges from simple things like comparing indexed columns to scalar values up to tips for reducing query compiles and asynchronous processing patterns.  Nearly all of these come from specific issues I’ve encountered working on poorly performing SQL Servers.&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/billg/aggbug/61390.aspx" width="1" height="1" /&gt;</description><dc:creator>Bill Graziano</dc:creator></item><item><title>A Rose by Any Other Name..</title><link>http://weblogs.sqlteam.com/geoffh/archive/2011/11/29/a-rose-by-any-other-name.aspx</link><pubDate>Tue, 29 Nov 2011 14:45:36 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/geoffh/archive/2011/11/29/a-rose-by-any-other-name.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/geoffh/comments/61389.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/geoffh/comments/commentRss/61389.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/geoffh/archive/2011/11/29/a-rose-by-any-other-name.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://weblogs.sqlteam.com/geoffh/services/trackbacks/61389.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/geoffh/rss.aspx">A Rose by Any Other Name..</source><description>&lt;p&gt; &lt;/p&gt;  &lt;p&gt;It is always a good start when you can steal a title line from one of the best writers in the English language.  Let’s hope I can make the rest of this post live up to the opening.  &lt;/p&gt;  &lt;p&gt;One recurring problem with SQL server is moving databases to new servers.  Client applications use a variety of ways to resolve SQL Server names, some of which are not changed easily &amp;lt;cough &lt;em&gt;SharePoint&lt;/em&gt; /cough&amp;gt;.  If you happen to be using default instances on both the source and target SQL Server, then the solution is pretty simple.  You create (or bug the network admin until she creates) two DNS “A” records. One points the old name to the new IP address.  The other creates a new alias for the old server, since the original system name is now redirected.  Note this will redirect ALL traffic from the old server to the new server, including RDP and file share connection attempts.  &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/geoffh/Windows-Live-Writer/A-Rose-by-Any-Other-Name_6DA2/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/geoffh/Windows-Live-Writer/A-Rose-by-Any-Other-Name_6DA2/image_thumb.png" width="565" height="301" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Figure 1 – Microsoft DNS MMC Snap-In&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/geoffh/Windows-Live-Writer/A-Rose-by-Any-Other-Name_6DA2/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/geoffh/Windows-Live-Writer/A-Rose-by-Any-Other-Name_6DA2/image_thumb_1.png" width="244" height="243" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Figure 2 – DNS New Host Dialog Box&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Both records are necessary so you can still access the old server via an alternate name.&lt;/p&gt;  &lt;div align="center"&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="630" align="center"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="138"&gt;&lt;strong&gt;Server Role&lt;/strong&gt;&lt;/td&gt;          &lt;td valign="top" width="141"&gt;&lt;strong&gt;IP Address&lt;/strong&gt;&lt;/td&gt;          &lt;td valign="top" width="97"&gt;&lt;strong&gt;Name&lt;/strong&gt;&lt;/td&gt;          &lt;td valign="top" width="252"&gt;&lt;strong&gt;Alias&lt;/strong&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="138"&gt;Source&lt;/td&gt;          &lt;td valign="top" width="141"&gt;10.97.230.60&lt;/td&gt;          &lt;td valign="top" width="97"&gt;SQL01&lt;/td&gt;          &lt;td valign="top" width="252"&gt;SQL01_Old&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="138"&gt;Target&lt;/td&gt;          &lt;td valign="top" width="141"&gt;10.97.230.80&lt;/td&gt;          &lt;td valign="top" width="97"&gt;SQL02&lt;/td&gt;          &lt;td valign="top" width="252"&gt;SQL01&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt;  &lt;p align="center"&gt;&lt;strong&gt;Table 1 – Alias List&lt;/strong&gt;&lt;/p&gt;  &lt;p align="left"&gt;If you or somebody set up connections via IP address, you deserve to have to go to each app and fix it by hand.  That is the only way to fix that particular foul-up.&lt;/p&gt;  &lt;p align="left"&gt;If have to deal with Named Instances either as a source or a target, then it gets more complicated.  The standard fix is to use the SQL Server Configuration Manager (or one of its earlier incarnations) to create a SQL client alias to redirect the connection.  This can be a pain installing and configuring the app on multiple client servers.  The good news is that SQL Server Configuration Manager AND all of its earlier versions simply write a few registry keys.  Extracting the keys into a .reg file makes centralized automated deployment a snap.&lt;/p&gt;  &lt;p align="left"&gt;If the client is a 32-bit system, you have to extract the native key.  If it is a 64-bit, you have to extract the native key and the WoW (32 bit on 64 bit host) key.&lt;/p&gt;  &lt;p align="left"&gt;First, pick a development system to create the actual registry key.  If you do this repeatedly, you can simply edit an existing registry file.  Create the entry using the SQL Configuration Manager.  You must use a 64-bit system to create the WoW key.  The following example redirects from a named instance “SQL01\SQLUtiluty” to a default instance on “SQL02”.&lt;/p&gt;  &lt;p align="left"&gt; &lt;/p&gt;  &lt;p align="left"&gt;&lt;a href="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/geoffh/Windows-Live-Writer/A-Rose-by-Any-Other-Name_6DA2/image_16.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/geoffh/Windows-Live-Writer/A-Rose-by-Any-Other-Name_6DA2/image_thumb_7.png" width="676" height="444" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Figure 3 – SQL Server Configuration Manager - Native&lt;/strong&gt;&lt;/p&gt;  &lt;p align="left"&gt;Figure 3 shows the native key listing.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/geoffh/Windows-Live-Writer/A-Rose-by-Any-Other-Name_6DA2/image_18.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/geoffh/Windows-Live-Writer/A-Rose-by-Any-Other-Name_6DA2/image_thumb_8.png" width="669" height="439" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Figure 4 – SQL Server Configuration Manager – WoW&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you think you don’t need the WoW key because your app is 64 it, think again.  SQL Server Management Server is a 32-bit app, as are most SQL test utilities.  Always create both keys for 64-bit target systems.&lt;/p&gt;  &lt;p align="left"&gt;Now that the keys exist, we can extract them into a .reg file. Fire up REGEDIT and browse to the following location:  HKLM\Software\Microsoft\MSSQLServer\Client\ConnectTo.  You can also search the registry for the string value of one of the server names (old or new).&lt;/p&gt;  &lt;p align="left"&gt;Right click on the “ConnectTo” label and choose “Export”.  Save with an appropriate name and location.  The resulting file should look something like this:&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/geoffh/Windows-Live-Writer/A-Rose-by-Any-Other-Name_6DA2/image_20.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/geoffh/Windows-Live-Writer/A-Rose-by-Any-Other-Name_6DA2/image_thumb_9.png" width="568" height="124" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Figure 5 – SQL01_Alias.reg&lt;/strong&gt;&lt;/p&gt;  &lt;p align="left"&gt;Repeat the process with the location: HKLM\Software\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo&lt;/p&gt;  &lt;p&gt;Note that if you have multiple alias entries, ALL of the entries will be exported.  In that case, you can edit the file and remove the extra aliases.&lt;/p&gt;  &lt;p&gt;You can edit the files together into a single file.  Just leave a blank line between new keys like this:&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/geoffh/Windows-Live-Writer/A-Rose-by-Any-Other-Name_6DA2/image_22.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/geoffh/Windows-Live-Writer/A-Rose-by-Any-Other-Name_6DA2/image_thumb_10.png" width="568" height="166" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Figure 6 – SQL01_Alias_All.reg&lt;/strong&gt;&lt;/p&gt;  &lt;p align="left"&gt;Of course if you have an automatic way to deploy, it makes sense to have an automatic way to Un-deploy.  To delete a registry key, simply edit the .reg file and replace the target with a “-“ sign like so.&lt;/p&gt;  &lt;p align="left"&gt;&lt;a href="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/geoffh/Windows-Live-Writer/A-Rose-by-Any-Other-Name_6DA2/image_24.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/geoffh/Windows-Live-Writer/A-Rose-by-Any-Other-Name_6DA2/image_thumb_11.png" width="566" height="166" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Figure 7 – SQL01_Alias_UNDO.reg&lt;/strong&gt;&lt;/p&gt;  &lt;p align="left"&gt;Now we have the ability to move any database to any server without having to install or change any applications on any client server.  The whole process should be transparent to the applications, which makes planning and coordinating database moves a far simpler task.&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/geoffh/aggbug/61389.aspx" width="1" height="1" /&gt;</description><dc:creator>Geoff N. Hiten</dc:creator></item><item><title>PASS Summit 2011 &amp;ndash; Part IV</title><link>http://weblogs.sqlteam.com/tarad/archive/2011/11/11/pass-summit-2011-ndash-part-iv.aspx</link><pubDate>Fri, 11 Nov 2011 22:04:26 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/tarad/archive/2011/11/11/pass-summit-2011-ndash-part-iv.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/tarad/comments/61388.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/tarad/comments/commentRss/61388.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/tarad/archive/2011/11/11/pass-summit-2011-ndash-part-iv.aspx#comment</comments><slash:comments>2</slash:comments><trackback:ping>http://weblogs.sqlteam.com/tarad/services/trackbacks/61388.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/tarad/rss.aspx">PASS Summit 2011 &amp;ndash; Part IV</source><description>&lt;p&gt;This is the final blog for my PASS Summit 2011 series.  Well okay, a mini-series, I guess.&lt;/p&gt;  &lt;p&gt;On the last day of the conference, I attended Keith Elmore’ and Boris Baryshnikov’s (both from Microsoft) “Introducing the Microsoft SQL Server Code Named “Denali” Performance Dashboard Reports, Jeremiah Peschka’s (&lt;a href="http://www.brentozar.com/consultants/jeremiah-peschka/"&gt;blog&lt;/a&gt;|&lt;a href="http://twitter.com/#!/peschkaj"&gt;twitter&lt;/a&gt;) “Rewrite your T-SQL for Great Good!”, and Kimberly Tripp’s (&lt;a href="http://www.sqlskills.com/BLOGS/KIMBERLY/"&gt;blog&lt;/a&gt;|&lt;a href="http://twitter.com/#!/KimberlyLTripp"&gt;twitter&lt;/a&gt;) “Isolated Disasters in VLDBs”.&lt;/p&gt;  &lt;p&gt;Keith and Boris talked about the lifecycle of a session, figuring out the running time and the waiting time.  They pointed out the transient nature of the reports.  You could be drilling into it to uncover a problem, but the session may have ended by the time you’ve drilled all of the way down.  Also, the reports are for troubleshooting live problems and not historical ones.  You can use Management Data Warehouse for historical troubleshooting.  The reports provide similar benefits to the Activity Monitor, however Activity Monitor doesn’t provide context sensitive drill through.&lt;/p&gt;  &lt;p&gt;One thing I learned in Keith’s and Boris’ session was that the buffer cache hit ratio should really never be below 87% due to the read-ahead mechanism in SQL Server.  When a page is read, it will read the entire extent.  So for every page read, you get 7 more read.  If you need any of those 7 extra pages, well they are already in cache.  &lt;/p&gt;  &lt;p&gt;I had a lot of fun in Jeremiah’s session about refactoring code plus I learned a lot.  His slides were visually presented in a fun way, which just made for a more upbeat presentation.  Jeremiah says that before you start refactoring, you should look at your system.  Investigate missing or too many indexes, out-of-date statistics, and other areas that could be leading to your code running slow.  He talked about code standards.  He suggested using common abbreviations for aliases instead of one-letter aliases.  I’m a big offender of one-letter aliases, but he makes a good point.  He said that join order does not matter to the optimizer, but it does matter to those who have to read your code.  Now let’s get into refactoring!&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Eliminate useless things – useless/unneeded joins and columns.  If you don’t need it, get rid of it!&lt;/li&gt;    &lt;li&gt;Instead of using DISTINCT/JOIN, replace with EXISTS&lt;/li&gt;    &lt;li&gt;Simplify your conditions; use UNION or better yet UNION ALL instead of OR to avoid a scan and use indexes for each union query&lt;/li&gt;    &lt;li&gt;Branching logic – instead of IF this, IF that, and on and on…use dynamic SQL (sp_executesql, please!) or use a parameterized query in the application&lt;/li&gt;    &lt;li&gt;Correlated subqueries – YUCK! Replace with a join&lt;/li&gt;    &lt;li&gt;Eliminate repeated patterns&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Last, but certainly not least, was Kimberly’s session.  Kimberly is my favorite speaker.  I attended her two-day pre-conference seminar at PASS Summit 2005 as well as a &lt;a href="http://www.sqlskills.com/ImmersionEvents.asp"&gt;SQL Immersion Event&lt;/a&gt; last December.  Did I mention she’s my favorite speaker?  Okay, enough of that.&lt;/p&gt;  &lt;p&gt;Kimberly’s session was packed with demos.  I had seen some of it in the SQL Immersion Event, but it was very nice to get a refresher on these, especially since I’ve got a VLDB with some growing pains.  One key takeaway from her session is the idea to use a log shipping solution with a load delay, such as 6, 8, or 24 hours behind the primary.  In the case of say an accidentally dropped table in a VLDB, we could retrieve it from the secondary database rather than waiting an eternity for a restore to complete.  Kimberly let us know that in SQL Server 2012 (it finally has a name!), online rebuilds are supported even if there are LOB columns in your table.  This will simplify custom code that intelligently figures out if an online rebuild is possible.&lt;/p&gt;  &lt;p&gt;There was actually one last time slot for sessions that day, but I had an airplane to catch and my kids to see!&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/tarad/aggbug/61388.aspx" width="1" height="1" /&gt;</description><dc:creator>Tara Kizer</dc:creator></item><item><title>PASS Summit 2011 &amp;ndash; Part III</title><link>http://weblogs.sqlteam.com/tarad/archive/2011/11/11/pass-summit-2011-ndash-part-iii.aspx</link><pubDate>Fri, 11 Nov 2011 20:22:14 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/tarad/archive/2011/11/11/pass-summit-2011-ndash-part-iii.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/tarad/comments/61387.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/tarad/comments/commentRss/61387.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/tarad/archive/2011/11/11/pass-summit-2011-ndash-part-iii.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://weblogs.sqlteam.com/tarad/services/trackbacks/61387.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/tarad/rss.aspx">PASS Summit 2011 &amp;ndash; Part III</source><description>&lt;p&gt;Well we’re about a month past PASS Summit 2011, and yet I haven’t finished blogging my notes! Between work and home life, I haven’t been able to come up for air in a bit.  Now on to my notes…&lt;/p&gt;  &lt;p&gt;On Thursday of the PASS Summit 2011, I attended Klaus Aschenbrenner’s (&lt;a href="http://www.sqlpassion.at/blog/"&gt;blog&lt;/a&gt;|&lt;a href="http://twitter.com/#!/Aschenbrenner"&gt;twitter&lt;/a&gt;) “Advanced SQL Server 2008 Troubleshooting”, Joe Webb’s (&lt;a href="http://webbtechsolutions.com/blog/"&gt;blog&lt;/a&gt;|&lt;a href="http://twitter.com/#!/joewebb"&gt;twitter&lt;/a&gt;) “SQL Server Locking &amp;amp; Blocking Made Simple”, Kalen Delaney’s (&lt;a href="http://sqlblog.com/blogs/kalen_delaney/"&gt;blog&lt;/a&gt;|&lt;a href="http://twitter.com/#!/sqlqueen"&gt;twitter&lt;/a&gt;) “What Happened? Exploring the Plan Cache”, and Paul Randal’s (&lt;a href="http://www.sqlskills.com/BLOGS/PAUL/"&gt;blog&lt;/a&gt;|&lt;a href="http://twitter.com/#!/paulrandal"&gt;twitter&lt;/a&gt;) “More DBA Mythbusters”.  I think my head grew two times in size from the Thursday sessions.  Just WOW!&lt;/p&gt;  &lt;p&gt;I took a ton of notes in Klaus' session.  He took a deep dive into how to troubleshoot performance problems.  Here is how he goes about solving a performance problem:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Start by checking the wait stats DMV&lt;/li&gt;    &lt;li&gt;System health&lt;/li&gt;    &lt;li&gt;Memory issues&lt;/li&gt;    &lt;li&gt;I/O issues&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I normally start with blocking and then hit the wait stats.  &lt;a href="http://www.sqlskills.com/BLOGS/PAUL/post/Wait-statistics-or-please-tell-me-where-it-hurts.aspx"&gt;Here’s the wait stat query (Paul Randal’s) that I use&lt;/a&gt; when working on a performance problem.  He highlighted a few waits to be aware of such as WRITELOG (indicates IO subsystem problem), SOS_SCHEDULER_YIELD (indicates CPU problem), and PAGEIOLATCH_XX (indicates an IO subsystem problem or a buffer pool problem).  &lt;/p&gt;  &lt;p&gt;Regarding memory issues, Klaus recommended that as a bare minimum, one should set the “max server memory (MB)” in sp_configure to 2GB or 10% reserved for the OS (whichever comes first).  This is just a starting point though!&lt;/p&gt;  &lt;p&gt;Regarding I/O issues, Klaus talked about disk partition alignment, which can improve SQL I/O performance by up to 100%.  You should use 64kb for NTFS cluster, and it’s automatic in Windows 2008 R2.&lt;/p&gt;  &lt;p&gt;Joe’s locking and blocking presentation was a good session to really clear up the fog in my mind about locking.  One takeaway that I had no idea could be done was that you can set a timeout in T-SQL code view LOCK_TIMEOUT.  If you do this via the application, you should trap error 1222.&lt;/p&gt;  &lt;p&gt;Kalen’s session went into execution plans.  The minimum size of a plan is 24k.  This adds up fast especially if you have a lot of plans that don’t get reused much.  You can use sys.dm_exec_cached_plans to check how often a plan is being reused by checking the usecounts column.  She said that we can use DBCC FLUSHPROCINDB to clear out the stored procedure cache for a specific database.  I didn’t know we had this available, so this was great to hear.  This will be less intrusive when an emergency comes up where I’ve needed to run DBCC FREEPROCCACHE.&lt;/p&gt;  &lt;p&gt;Kalen said one should enable “optimize for ad hoc workloads” if you have an adhoc loc.  This stores only a 300-byte stub of the first plan, and if it gets run again, it’ll store the whole thing.  This helps with plan cache bloat.  &lt;/p&gt;  &lt;p&gt;I have a lot of systems that use prepared statements, and Kalen says we simulate those calls by using sp_executesql.  Cool!&lt;/p&gt;  &lt;p&gt;Paul did a series of posts last year to debunk various myths and misconceptions around SQL Server.  He continues to debunk things via “DBA Mythbusters”.  You can get a PDF of a bunch of these &lt;a href="http://www.devconnections.com/updates/LasVegas_Spring10/SQL/Randal-SQL-SDB306-Mythbusters.pdf"&gt;here&lt;/a&gt;.  One of the myths he went over is the number of tempdb data files that you should have.  Back in 2000, the recommendation was to have as many tempdb data files as there are CPU cores on your server.  This no longer holds true due to the numerous cores we have on our servers.  Paul says you should start out with 1/4 to 1/2 the number of cores and work your way up from there.  BUT!  Paul likes what Bob Ward (&lt;a href="http://twitter.com/#!/bobwardms"&gt;twitter&lt;/a&gt;) says on this topic:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;8 or less cores –&amp;gt; set number of files equal to the number of cores&lt;/li&gt;    &lt;li&gt;Greater than 8 cores –&amp;gt; start with 8 files and increase in blocks of 4&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;One common myth out there is to set your MAXDOP to 1 for an OLTP workload with high CXPACKET waits.  Instead of that, dig deeper first.  Look for missing indexes, out-of-date statistics, increase the “cost threshold for parallelism” setting, and perhaps set MAXDOP at the query level.  &lt;/p&gt;  &lt;p&gt;Paul stressed that you should not plan a backup strategy but instead plan a restore strategy.  What are your recoverability requirements?  Once you know that, now plan out your backups.&lt;/p&gt;  &lt;p&gt;As Paul always does, he talked about DBCC CHECKDB.  He said how fabulous it is.  I didn’t want to interrupt the presentation, so after his session had ended, I asked Paul about the need to run DBCC CHECKDB on your mirror systems.  You could have data corruption occur at the mirror and not at the principal server.  If you aren’t checking for data corruption on your mirror systems, you could be failing over to a corrupt database in the case of a disaster or even a planned failover.  You can’t run DBCC CHECKDB against the mirrored database, but you can run it against a snapshot off the mirrored database. &lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/tarad/aggbug/61387.aspx" width="1" height="1" /&gt;</description><dc:creator>Tara Kizer</dc:creator></item><item><title>A new version of SQL Treeo released</title><link>http://weblogs.sqlteam.com/lucaz/archive/2011/11/09/versione-2-di-sql-treeo-rilasciata.aspx</link><pubDate>Wed, 09 Nov 2011 08:34:40 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/lucaz/archive/2011/11/09/versione-2-di-sql-treeo-rilasciata.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/lucaz/comments/61386.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/lucaz/comments/commentRss/61386.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/lucaz/archive/2011/11/09/versione-2-di-sql-treeo-rilasciata.aspx#comment</comments><slash:comments>1</slash:comments><trackback:ping>http://weblogs.sqlteam.com/lucaz/services/trackbacks/61386.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/lucaz/rss.aspx">A new version of SQL Treeo released</source><description>&lt;p&gt;A new SQL Treeo update is available at &lt;a href="http://www.sqltreeo.com"&gt;http://www.sqltreeo.com&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Lot of bugs fixed so now it seems to be a stable add-on for SSMS.&lt;/p&gt;  &lt;p&gt;The full change log is available here:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.sqltreeo.com/wp/new-version-of-sql-treeo-ssms-productivity-add-in-was-released/"&gt;http://www.sqltreeo.com/wp/new-version-of-sql-treeo-ssms-productivity-add-in-was-released/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So, update your SSMS clients :)&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/lucaz/aggbug/61386.aspx" width="1" height="1" /&gt;</description><dc:creator>Luca Zavarella</dc:creator></item><item><title>Virtual Lab part 2&amp;ndash;Templates, Patterns, Baselines</title><link>http://weblogs.sqlteam.com/geoffh/archive/2011/11/01/virtual-lab-part-2ndashtemplates-patterns-baselines.aspx</link><pubDate>Tue, 01 Nov 2011 16:42:45 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/geoffh/archive/2011/11/01/virtual-lab-part-2ndashtemplates-patterns-baselines.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/geoffh/comments/61383.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/geoffh/comments/commentRss/61383.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/geoffh/archive/2011/11/01/virtual-lab-part-2ndashtemplates-patterns-baselines.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://weblogs.sqlteam.com/geoffh/services/trackbacks/61383.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/geoffh/rss.aspx">Virtual Lab part 2&amp;ndash;Templates, Patterns, Baselines</source><description>&lt;p&gt;Once you have a good virtualization platform chosen, whether it is a desktop, server or laptop environment, the temptation is to build “X”.  “X” may be a SharePoint lab, a Virtual Cluster, an AD test environment or some other cool project that you really need RIGHT NOW.  That would be doing it wrong.&lt;/p&gt;
&lt;p&gt;My grandfather taught woodworking and cabinetmaking for twenty-seven years at a trade school in Alabama.  He was the first instructor hired at that school and the only teacher for the first two years.  His students built tables, chairs, and workbenches so the school could start its HVAC courses.   Visiting as a child, I also noticed many extra “helper” stands, benches, holders, and gadgets all built from wood.  &lt;/p&gt;
&lt;p&gt;What does that have to do with a virtual lab, you ask?  Well, that is the same approach you should take.  Build stuff that you will use.  Not for solving a particular problem, but to let the Virtual Lab be part of your normal troubleshooting toolkit. &lt;/p&gt;
&lt;p&gt;Start with basic copies of various Operating Systems.  Load and patch server and desktop OS environments.  This also helps build your collection of ISO files, another essential element of a virtual Lab.  Once you have these “baseline” images, you can use your Virtualization software’s snapshot capability to freeze the image.  Clone the snapshot and you have a brand new fully patched machine in mere moments.  You may have to sysprep some of the Microsoft OS environments if you are going to create a domain environment or experiment with clustering.  That is still much faster than loading and patching from scratch.&lt;/p&gt;
&lt;p&gt;So once you have a stock of raw materials (baseline images in this case) where should you start.  Again, my grandfather’s workshop gives us the answer.  In the shop it was workbenches and tables to hold large workpieces that made the equipment more useful.  In a Windows environment the same role falls to the fundamental network services:  DHCP, DNS, Active Directory, Routing, File Services, and Storage services.  Plan your internal network setup.  Build out an AD controller with all the features listed.  Make the actual domain an isolated domain so it will not care about where you take it.  Add the Microsoft iSCSI target.  Once you have this single system, you can leverage it for almost any network environment beyond a simple stand-alone system.&lt;/p&gt;
&lt;p&gt;Having these templates and fundamental infrastructure elements ready to run means I can build a quick lab in minutes instead of hours.  My solutions are well-tested, my processes fully documented with screenshots, and my plans validated well before I have to make any changes to client systems.  the work I put in is easily returned in increased value and client satisfaction.&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/geoffh/aggbug/61383.aspx" width="1" height="1" /&gt;</description><dc:creator>Geoff N. Hiten</dc:creator></item><item><title>SQL 2012 Licensing Thoughts</title><link>http://weblogs.sqlteam.com/geoffh/archive/2011/11/03/sql-2012-licensing-thoughts.aspx</link><pubDate>Thu, 03 Nov 2011 16:30:23 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/geoffh/archive/2011/11/03/sql-2012-licensing-thoughts.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/geoffh/comments/61385.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/geoffh/comments/commentRss/61385.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/geoffh/archive/2011/11/03/sql-2012-licensing-thoughts.aspx#comment</comments><slash:comments>6</slash:comments><trackback:ping>http://weblogs.sqlteam.com/geoffh/services/trackbacks/61385.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/geoffh/rss.aspx">SQL 2012 Licensing Thoughts</source><description>&lt;p&gt;The only thing more controversial than new Federal Tax plans is new Licensing plans from Microsoft.  In both cases, everyone calculates several numbers.  &lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;First, will I pay more or less under this plan?  &lt;/li&gt;
    &lt;li&gt;Second, will my competition pay more or less than now?  &lt;/li&gt;
    &lt;li&gt;Third, will &amp;lt;insert interesting person/company here&amp;gt; pay more or less?  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Not that items 2 and 3 are meaningful, that is just how people think.&lt;/p&gt;
&lt;p&gt;Much like tax plans, the devil is in the details, so lets see how this looks.  Microsoft shows it here: &lt;a title="http://www.microsoft.com/sqlserver/en/us/future-editions/sql2012-licensing.aspx" href="http://www.microsoft.com/sqlserver/en/us/future-editions/sql2012-licensing.aspx"&gt;http://www.microsoft.com/sqlserver/en/us/future-editions/sql2012-licensing.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;First up is a switch from per-socket to per-core licensing.  Anyone who didn’t see something like this coming should rapidly search for a new line of work because you are not paying attention.  The explosion of multi-core processors has made SQL Server a bargain.  Microsoft is in business to make money and the old per-socket model was not going to do that going forward.&lt;/p&gt;
&lt;p&gt;Per-core licensing also simplifies virtualization licensing.  Physical Core = Virtual Core, at least for licensing.  Oversubscribe your processors, that’s your lookout.  You still pay for  what is exposed to the VM.  The cool part is you can seamlessly move physical and virtual workloads around and the licenses follow.  The catch is you have to have Software Assurance to make the licenses mobile.  Nice touch there.&lt;/p&gt;
&lt;p&gt;Let’s have a moment of silence for the late, unlamented, largely ignored Workgroup Edition.  To quote the Microsoft  FAQ:  “&lt;em&gt;Standard becomes our sole edition for basic database needs&lt;/em&gt;”.  Considering I haven’t encountered a singe instance of SQL Server Workgroup Edition in the wild, I don’t think this will be all that controversial.&lt;/p&gt;
&lt;p&gt;As for pricing, it looks like a wash with current per-socket pricing based on four core sockets.  Interestingly, that is the minimum core count Microsoft proposes to swap to transition per-socket to per-core if you are on Software Assurance.  Reading the fine print shows that if you are using more, you will get more core licenses:&lt;/p&gt;
&lt;p&gt;From the licensing FAQ.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a name="_Toc308001351"&gt;&lt;font size="3"&gt;15. How do I migrate from processor licenses to core licenses?  What is the migration path?&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Licenses purchased with Software Assurance (SA) will upgrade to SQL Server 2012 at no additional cost. EA/EAP customers can continue buying processor licenses until your next renewal after June 30, 2012. At that time, processor licenses will be exchanged for core-based licenses sufficient to cover the cores in use by processor-licensed databases (minimum of 4 cores per processor for Standard and Enterprise, and minimum of 8 EE cores per processor for Datacenter).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Looks like the folks who invested in the AMD 12-core chips will make out like bandits. &lt;/p&gt;
&lt;p&gt;Now, on to something new: SQL Server Business Intelligence Edition. Yep, finally a BI-specific SKU licensed for server+CAL configurations only.  Note that Enterprise Edition still supports the complete feature set; the BI Edition is intended for smaller shops who want to use the full BI feature set but without needing Enterprise Edition scale (or costs).  No, you don’t get ColumnStore, Compression, or Partitioning in the BI Edition.  Those are Enterprise scale features, ThankYouVeryMuch.  Then again, your starting licensing costs are about one sixth of an Enterprise Edition system (based on an 8 core server).&lt;/p&gt;
&lt;p&gt;The only part of the message I am missing is if the current Failover Licensing Policy will change.  Do we need to fully or partially license failover servers?  That is a detail I definitely want to know.&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/geoffh/aggbug/61385.aspx" width="1" height="1" /&gt;</description><dc:creator>Geoff N. Hiten</dc:creator></item><item><title>SQL Server Developer Tools &amp;ndash; Codename Juneau vs. Red-Gate SQL Source Control</title><link>http://weblogs.sqlteam.com/markc/archive/2011/10/25/sql-server-developer-tools-ndash-codename-juneau-vs-red-gate.aspx</link><pubDate>Wed, 26 Oct 2011 06:14:11 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/markc/archive/2011/10/25/sql-server-developer-tools-ndash-codename-juneau-vs-red-gate.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/markc/comments/61382.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/markc/comments/commentRss/61382.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/markc/archive/2011/10/25/sql-server-developer-tools-ndash-codename-juneau-vs-red-gate.aspx#comment</comments><slash:comments>2</slash:comments><trackback:ping>http://weblogs.sqlteam.com/markc/services/trackbacks/61382.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/markc/rss.aspx">SQL Server Developer Tools &amp;ndash; Codename Juneau vs. Red-Gate SQL Source Control</source><description>&lt;p&gt;So how do the new SQL Server Developer Tools (previously code-named Juneau) stack up against SQL Source Control?  Read on to find out.&lt;/p&gt;  &lt;p&gt;At the PASS Community Summit a couple of weeks ago, it was announced that the previously code-named Juneau software would be released under the name of SQL Server Developer Tools with the release of SQL Server 2012.  This replacement for Database Projects in Visual Studio (also known in a former life as Data Dude) has some great new features.  I won’t attempt to describe them all here, but I will applaud Microsoft for making major improvements.  One of my favorite changes is the way database elements are broken down.  Previously every little thing was in its own file.  For example, indexes were each in their own file.  I always hated that.  Now, SSDT uses a pattern similar to Red-Gate’s and puts the indexes and keys into the same file as the overall table definition.&lt;/p&gt;  &lt;p&gt;Of course there are really cool features to keep your database model in sync with the actual source scripts, and the rename refactoring feature is now touted as being more than just a search and replace, but rather a “semantic-aware” search and replace.  Funny, it reminds me of SQL Prompt’s Smart Rename feature.  But I’m not writing this just to criticize Microsoft and argue that they are late to the party with this feature set.  Instead, I do see it as a viable alternative for folks who want all of their source code to be version controlled, but there are a couple of key trade-offs that you need to know about when you choose which tool set to use.&lt;/p&gt;  &lt;h3&gt;First, the basics&lt;/h3&gt;  &lt;p&gt;Both tool sets integrate with a wide variety of source control systems including the most popular: Subversion, GIT, Vault, and Team Foundation Server.  Both tools have integrated functionality to produce objects to upgrade your target database when you are ready (DACPACs in SSDT, integration with SQL Compare for SQL Source Control).  If you regularly live in Visual Studio or the Business Intelligence Development Studio (BIDS) then SSDT will likely be comfortable for you.  Like BIDS, SSDT is a Visual Studio Project Type that comes with SQL Server, and if you don’t already have Visual Studio installed, it will install the shell for you.  If you already have Visual Studio 2010 installed, then it will just add this as an available project type.  On the other hand, if you regularly live in SQL Server Management Studio (SSMS) then you will really enjoy the SQL Source Control integration from within SSMS.  Both tool sets store their database model in script files.  In SSDT, these are on your file system like other source files; in SQL Source Control, these are stored in the folder structure in your source control system, and you can always GET them to your file system if you want to browse them directly.&lt;/p&gt;  &lt;p&gt;For me, the key differentiating factors are 1) a single, unified check-in, and 2) migration scripts.  How you value those two features will likely make your decision for you.&lt;/p&gt;  &lt;h3&gt;Unified Check-In&lt;/h3&gt;  &lt;p&gt;If you do a &lt;a href="http://martinfowler.com/articles/continuousIntegration.html"&gt;continuous-integration&lt;/a&gt; (CI) style of development that triggers an automated build with unit testing on every check-in of source code, and you use Visual Studio for the rest of your development, then you will want to really consider SSDT.  Because it is just another project in Visual Studio, it can be added to your existing Solution, and you can then do a complete, or unified single check-in of all changes whether they are application or database changes.  This is simply not possible with SQL Source Control because it is in a different development tool (SSMS instead of Visual Studio) and there is no way to do one unified check-in between the two.  You CAN do really fast back-to-back check-ins, but there is the possibility that the automated build that is triggered from the first check-in will cause your unit tests to fail and the CI tool to report that you broke the build.  Of course, the automated build that is triggered from the second check-in which contains the “other half” of your changes should pass and so the amount of time that the build was broken may be very, very short, but if that is very, very important to you, then SQL Source Control just won’t work; you’ll have to use SSDT.&lt;/p&gt;  &lt;h3&gt;Refactoring and Migrations&lt;/h3&gt;  &lt;p&gt;If you work on a mature system, or on a not-so-mature but also not-so-well-designed system, where you want to refactor the database schema as you go along, but you can’t have data suddenly disappearing from your target system, then you’ll probably want to go with SQL Source Control.  As &lt;a href="http://weblogs.sqlteam.com/markc/archive/2011/08/08/sql-source-control-and-custom-change-scripts.aspx"&gt;I wrote previously&lt;/a&gt;, there are a number of changes which you can make to your database that the comparison tools (both from Microsoft and Red Gate) simply cannot handle without the possibility (or probability) of data loss.  Currently, SSDT only offers you the ability to inject PRE and POST custom deployment scripts.  There is no way to insert your own script in the middle to override the default behavior of the tool.  In version 3.0 of SQL Source Control (&lt;a href="http://www.surveymk.com/s/SqlSourceControl_Download"&gt;Early Access version now available&lt;/a&gt;) you have that ability to create your own custom migration script to take the place of the commands that the tool would have done, and ensure the preservation of your data.  Or, even if the default tool behavior would have worked, but you simply know a better way then you can take control and do things your way instead of theirs.&lt;/p&gt;  &lt;h3&gt;You Decide&lt;/h3&gt;  &lt;p&gt;In the environment I work in, our automated builds are not triggered off of check-ins, but off of the clock (currently once per night) and so there is no point at which the automated build and unit tests will be triggered without having both sides of the development effort already checked-in.  Therefore having a unified check-in, while handy, is not critical for us.  As for migration scripts, these are critically important to us.  We do a lot of new development on systems that have already been in production for years, and it is not uncommon for us to need to do a refactoring of the database.  Because of the maturity of the existing system, that often involves data migrations or other additional SQL tasks that the comparison tools just can’t detect on their own.  Therefore, the ability to create a custom migration script to override the tool’s default behavior is very important to us.  And so, you can see why we will continue to use Red Gate SQL Source Control for the foreseeable future.&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/markc/aggbug/61382.aspx" width="1" height="1" /&gt;</description><dc:creator>Ajarn Mark Caldwell</dc:creator></item><item><title>Queerie Memoree Spils</title><link>http://weblogs.sqlteam.com/robv/archive/2011/10/18/queerie-memoree-spils.aspx</link><pubDate>Tue, 18 Oct 2011 21:24:04 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/robv/archive/2011/10/18/queerie-memoree-spils.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/robv/comments/61380.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/robv/comments/commentRss/61380.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/robv/archive/2011/10/18/queerie-memoree-spils.aspx#comment</comments><slash:comments>1</slash:comments><trackback:ping>http://weblogs.sqlteam.com/robv/services/trackbacks/61380.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/robv/rss.aspx">Queerie Memoree Spils</source><description>&lt;p&gt;Did you know that if you run a query in SQL Server, and it processes it as a hash match, and there's not enough memory to fully process it, the memory will spill to disk?  You can find out all about it &lt;a title="Nope, not gonna link to that *OTHER* article.  I might get #sqlsue-d." href="http://msdn.microsoft.com/en-us/library/ms190736.aspx" target="_blank"&gt;here.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Note: I know this makes even less sense than my usual blog posts do, so for more information, check out &lt;a href="https://twitter.com/#!/MidnightDBA" target="_blank"&gt;Jen's&lt;/a&gt; &lt;a href="http://www.midnightdba.com/Jen/" target="_blank"&gt;Awesomesauce&lt;/a&gt; &lt;a href="http://www.midnightdba.com/Jen/2011/10/rat-sues-corn-rather-rat-accuses-corn-of-thought-theft-or-something/" target="_blank"&gt;blog entry&lt;/a&gt; about it.  (Please don't sue me Jen!)&lt;/p&gt;  &lt;p&gt;#sqlsue&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/robv/aggbug/61380.aspx" width="1" height="1" /&gt;</description><dc:creator>Most Valuable Yak (Rob Volk)</dc:creator></item><item><title>PASS Summit 2011 &amp;ndash; Part II</title><link>http://weblogs.sqlteam.com/tarad/archive/2011/10/18/pass-summit-2011-ndash-part-ii.aspx</link><pubDate>Wed, 19 Oct 2011 03:54:38 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/tarad/archive/2011/10/18/pass-summit-2011-ndash-part-ii.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/tarad/comments/61381.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/tarad/comments/commentRss/61381.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/tarad/archive/2011/10/18/pass-summit-2011-ndash-part-ii.aspx#comment</comments><slash:comments>1</slash:comments><trackback:ping>http://weblogs.sqlteam.com/tarad/services/trackbacks/61381.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/tarad/rss.aspx">PASS Summit 2011 &amp;ndash; Part II</source><description>&lt;p&gt;I arrived in Seattle last Monday afternoon to attend PASS Summit 2011.  I had really wanted to attend Gail Shaw’s (&lt;a href="http://sqlinthewild.co.za/"&gt;blog&lt;/a&gt;|&lt;a href="http://twitter.com/#!/SQLintheWild"&gt;twitter&lt;/a&gt;) and Grant Fritchey’s (&lt;a href="http://www.scarydba.com/"&gt;blog&lt;/a&gt;|&lt;a href="http://twitter.com/#!/GFritchey"&gt;twitter&lt;/a&gt;) pre-conference seminar “&lt;a href="http://www.sqlpass.org/summit/2011/Speakers/CallForSpeakers/SessionDetail.aspx?sid=1245"&gt;All About Execution Plans&lt;/a&gt;” on Monday, but that would have meant flying out on Sunday which I couldn’t do.  &lt;/p&gt;  &lt;p&gt;On Tuesday, I attended Allan Hirt’s (&lt;a href="http://sqlha.com/blog"&gt;blog&lt;/a&gt;|&lt;a href="http://twitter.com/#!/SQLHA"&gt;twitter&lt;/a&gt;) pre-conference seminar entitled “&lt;a href="http://www.sqlpass.org/summit/2011/Speakers/CallForSpeakers/SessionDetail.aspx?sid=1076"&gt;A Deep Dive into AlwaysOn: Failover Clustering and Availability Groups&lt;/a&gt;”.  Allan is a great speaker, and his seminar was packed with demos and information about AlwaysOn in SQL Server 2012.  Unfortunately, I have lost my notes from this seminar and the presentation materials are only available on the pre-con DVD.  Hmpf!&lt;/p&gt;  &lt;p&gt;On Wednesday, I attended Gail Shaw’s “&lt;a href="http://www.sqlpass.org/summit/2011/Speakers/CallForSpeakers/SessionDetail.aspx?sid=1311"&gt;Bad Plan! Sit!&lt;/a&gt;”, Andrew Kelly’s (&lt;a href="http://sqlblog.com/blogs/andrew_kelly/default.aspx"&gt;blog&lt;/a&gt;|&lt;a href="http://twitter.com/#!/gunneyk"&gt;twitter&lt;/a&gt;) “&lt;a href="http://www.sqlpass.org/summit/2011/Speakers/CallForSpeakers/SessionDetail.aspx?sid=1436"&gt;SQL 2008 Query Statistics&lt;/a&gt;”, Dan Jones’ (&lt;a href="http://blogs.msdn.com/b/dtjones/"&gt;blog&lt;/a&gt;|&lt;a href="http://twitter.com/#!/msdtjones"&gt;twitter&lt;/a&gt;) “&lt;a href="http://www.sqlpass.org/summit/2011/Speakers/CallForSpeakers/SessionDetail.aspx?sid=1897"&gt;Improving your PowerShell Productivity&lt;/a&gt;”, and Brent Ozar’s (&lt;a href="http://www.brentozar.com/"&gt;blog&lt;/a&gt;|&lt;a href="http://twitter.com/#!/BrentO"&gt;twitter&lt;/a&gt;) “&lt;a href="http://www.sqlpass.org/summit/2011/Speakers/CallForSpeakers/SessionDetail.aspx?sid=1052"&gt;BLITZ! The SQL – More One Hour SQL Server Takeovers&lt;/a&gt;”.  &lt;/p&gt;  &lt;p&gt;In Gail’s session, she went over how to fix bad plans and bad query patterns.  Update your stale statistics! &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;How to fix bad plans&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Use local variables – optimizer can’t sniff it, so it’ll optimize for “average” value&lt;/li&gt;      &lt;li&gt;Use RECOMPILE (at the query or stored procedure level) – CPU hit&lt;/li&gt;      &lt;li&gt;OPTIMIZE FOR hint – most common value you’ll pass&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;How to fix bad query patterns&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Don’t use them – ha!&lt;/li&gt;      &lt;li&gt;Catch-all queries&lt;/li&gt;      &lt;ul&gt;       &lt;li&gt;Use dynamic SQL&lt;/li&gt;        &lt;li&gt;OPTION (RECOMPILE)&lt;/li&gt;     &lt;/ul&gt;      &lt;li&gt;Multiple execution paths&lt;/li&gt;      &lt;ul&gt;       &lt;li&gt;Split into multiple stored procedures&lt;/li&gt;        &lt;li&gt;OPTION (RECOMPILE)&lt;/li&gt;     &lt;/ul&gt;      &lt;li&gt;Modifying parameter values&lt;/li&gt;      &lt;ul&gt;       &lt;li&gt;Use local variables&lt;/li&gt;        &lt;li&gt;Split into outer and inner procedure&lt;/li&gt;        &lt;li&gt;OPTION (RECOMPILE)&lt;/li&gt;     &lt;/ul&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;She also went into “last resort” and “very last resort” options, but those are risky unless you know what you are doing.  For the average Joe, she wouldn’t recommend these.  Examples are query hints and plan guides. &lt;/p&gt;  &lt;p&gt;While I enjoyed Andrew’s session, I didn’t take any notes as it was familiar material.  Andrew is a great speaker though, and I’d highly recommend attending his sessions in the future.&lt;/p&gt;  &lt;p&gt;Next up was Dan’s PowerShell session.  I need to look into profiles, manifests, function modules, and function import scripts more as I just didn’t quite grasp these concepts.  I am attending a PowerShell training class at the end of November, so maybe that’ll help clear it up.  I really enjoyed the Excel integration demo.  It was very cool watching PowerShell build the spreadsheet in real-time.  I must look into this more!  On a side note, I am jealous of Dan’s hair.  Fabulous hair!&lt;/p&gt;  &lt;p&gt;Brent’s session showed us how to quickly gather information about a server that you will be taking over database administration duties for.  He wrote a script to do a fast health check and then later wrapped it into a stored procedure, &lt;a href="http://www.brentozar.com/blitz/"&gt;sp_Blitz&lt;/a&gt;.  I can’t wait to use this at my work even on systems where I’ve been the primary DBA for years, maybe there’s something I’ve overlooked.  We are using &lt;a href="http://epmframework.codeplex.com/"&gt;EPM&lt;/a&gt; to help standardize our environment and uncover problems, but sp_Blitz will definitely still help us out.  He even provides a cloud-based update feature, &lt;a href="http://www.brentozar.com/blitz/update/"&gt;sp_BlitzUpdate&lt;/a&gt;, for sp_Blitz so you don’t have to constantly update it when he makes a change.  I think I’ll utilize his update code for some other challenges that we face at my work.&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/tarad/aggbug/61381.aspx" width="1" height="1" /&gt;</description><dc:creator>Tara Kizer</dc:creator></item><item><title>PASS Summit 2011 &amp;ndash; Part I</title><link>http://weblogs.sqlteam.com/tarad/archive/2011/10/18/pass-summit-2011-ndash-part-i.aspx</link><pubDate>Tue, 18 Oct 2011 17:34:53 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/tarad/archive/2011/10/18/pass-summit-2011-ndash-part-i.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/tarad/comments/61379.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/tarad/comments/commentRss/61379.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/tarad/archive/2011/10/18/pass-summit-2011-ndash-part-i.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://weblogs.sqlteam.com/tarad/services/trackbacks/61379.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/tarad/rss.aspx">PASS Summit 2011 &amp;ndash; Part I</source><description>&lt;p&gt;What an amazing week I had at &lt;a href="http://www.sqlpass.org/summit/2011/"&gt;PASS Summit 2011&lt;/a&gt; in Seattle, WA!  I hadn’t attended a PASS conference since September of 2005 when it was in Grapevine, Texas.  It has grown so much since then.  I am not sure how many people attended back then, but I’d guesstimate about 1500.  They announced that at this year’s conference there were 4000 attendees.  WOW!&lt;/p&gt;  &lt;p&gt;Here are my favorite aspects of this conference:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Networking! – Not only did I meet a lot of new people, but I also got to meet people in person that I’ve known on the Internet for years like Mladen Prajdić (&lt;a href="http://weblogs.sqlteam.com/mladenp/default.aspx"&gt;blog&lt;/a&gt;|&lt;a href="http://twitter.com/#!/MladenPrajdic"&gt;twitter&lt;/a&gt;) and Rob Volk (&lt;a href="http://weblogs.sqlteam.com/robv/default.aspx"&gt;blog&lt;/a&gt;|&lt;a href="http://twitter.com/#!/sql_r"&gt;twitter&lt;/a&gt;).  I even met someone that I’d &lt;a href="http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=166227"&gt;recently helped out&lt;/a&gt; in the &lt;a href="http://www.sqlteam.com"&gt;SQLTeam&lt;/a&gt; &lt;a href="http://www.sqlteam.com/forums"&gt;forums&lt;/a&gt;.  &lt;/li&gt;    &lt;li&gt;Learning – I took a lot of notes during the sessions I attended and plan on blogging very soon about them.  It is amazing the amount of things you learn and the things that you unlearn.  Yes I said unlearn.  Some of the stuff that I thought I knew was either out-dated or just plain wrong.  &lt;/li&gt;    &lt;li&gt;Fun, fun, fun – To say that this conference was fun would be an understatement.  I had a blast!  &lt;ul&gt;       &lt;li&gt;I attended the “Welcome Reception and Quizbowl” on Tuesday night, the “Exhibitor Reception” on Wednesday night, and the “Community Appreciation Party” at &lt;a href="http://www.gameworks.com/"&gt;GameWorks&lt;/a&gt; on Thursday night.  There were many other after-hours events to attend, but I had to make my kids a priority at night so I had to get back to my hotel room before 9pm so that I could Skype with them.   &lt;/li&gt;        &lt;li&gt;It was very entertaining reading and posting with #sqlpass on Twitter.  Twitter has changed the conference experience for the better.  &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I will definitely be able to do my job better due to attending this conference.  The return on investment is HUGE!&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/tarad/aggbug/61379.aspx" width="1" height="1" /&gt;</description><dc:creator>Tara Kizer</dc:creator></item><item><title>PASS: Total Registrations</title><link>http://weblogs.sqlteam.com/billg/archive/2011/10/08/pass-total-registrations.aspx</link><pubDate>Sat, 08 Oct 2011 19:23:04 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/billg/archive/2011/10/08/pass-total-registrations.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/billg/comments/61363.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/billg/comments/commentRss/61363.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/billg/archive/2011/10/08/pass-total-registrations.aspx#comment</comments><slash:comments>2</slash:comments><trackback:ping>http://weblogs.sqlteam.com/billg/services/trackbacks/61363.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/billg/rss.aspx">PASS: Total Registrations</source><description>&lt;p&gt;&lt;img style="display: inline; float: right" align="right" src="http://farm4.static.flickr.com/3031/3046689110_6d9b09dcb0.jpg" width="282" height="189" /&gt;At the Summit you’ll see PASS announce the total attendance and the “total registrations”.  The total registrations is the sum of the conference attendees and the pre-conference registrations.  A single person can be counted three times (conference plus two pre-cons) in the total registration count.&lt;/p&gt;  &lt;p&gt;When I was doing marketing for the Summit this drove me nuts.  I couldn’t figure out why anyone would use total registrations.  However, when I tried to stop reporting this number I got lots of pushback.  Apparently this is how conferences compare themselves to each other.  Vendors, sponsors and Microsoft all wanted to know our total registration number.  I was even asked why we weren’t doing more “things” that people could register for so that our number would be even larger.  This drove me nuts.&lt;/p&gt;  &lt;p&gt;I understand that many of you are very detail oriented.  I just want to make sure you understand what numbers you’re seeing when we include them in the keynote at the Summit.&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/billg/aggbug/61363.aspx" width="1" height="1" /&gt;</description><dc:creator>Bill Graziano</dc:creator></item><item><title>SQL Server MVP Deep Dives 2. The Awesome Returns.</title><link>http://weblogs.sqlteam.com/mladenp/archive/2011/10/07/sql-server-mvp-deep-dives-2-the-awesome-returns.aspx</link><pubDate>Fri, 07 Oct 2011 17:26:08 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/mladenp/archive/2011/10/07/sql-server-mvp-deep-dives-2-the-awesome-returns.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/mladenp/comments/61362.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/mladenp/comments/commentRss/61362.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/mladenp/archive/2011/10/07/sql-server-mvp-deep-dives-2-the-awesome-returns.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://weblogs.sqlteam.com/mladenp/services/trackbacks/61362.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/mladenp/rss.aspx">SQL Server MVP Deep Dives 2. The Awesome Returns.</source><description>&lt;p&gt;Two years ago 59 SQL Server MVP's came together and helped make one of the best book on SQL Server out there. Each chapter was written by an MVP about a part of SQL Server they loved working with. This resulted in superb quality content and excellent ratings from the readers. To top it off all earnings went to a good cause, the &lt;a href="http://www.warchild.org"&gt;&lt;strong&gt;War Child International&lt;/strong&gt;&lt;/a&gt; organization. That book was &lt;a href="http://www.manning.com/nielsen/"&gt;&lt;strong&gt;SQL Server MVP Deep Dives&lt;/strong&gt;&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;This year 63 SQL Server MVPs, me included, decided it was time do repeat the success of the first book. &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Let me introduce you the:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.manning.com/delaney/"&gt;&lt;strong&gt;&lt;font size="4"&gt;SQL Server MVP Deep Dives 2&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="SQL Server MVP Deep Dives 2" href="http://www.manning.com/delaney/"&gt;&lt;img width="300" height="300" title="MVPDeepDives2Small" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" alt="MVPDeepDives2Small" border="0" src="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/mladenp/Windows-Live-Writer/MVP-DEEP-DIVES-2.-The-Awesome-Returns_F8CF/MVPDeepDives2Small_3.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The topics in 60 chapters are grouped in 5 groups: Architecture, Database Administration, Database Development, Performance Tuning and Optimization, Business Intelligence. They represent over 1000 years of daily experience in various areas of SQL Server. I have contributed chapter 28 in Database Development group titled &lt;strong&gt;Getting asynchronous with Service Broker&lt;/strong&gt;. In it I show you the Service Broker template you can use for secure communication between two or more SQL server instances for whatever purpose you may have. If you haven't heard of Service Broker it's a part of the database engine that enables you to do completely async operations in the database itself or between databases and instances.&lt;/p&gt;
&lt;p&gt;The official release of the book will be next week at &lt;a href="http://www.sqlpass.org/"&gt;&lt;strong&gt;PASS&lt;/strong&gt;&lt;/a&gt; where there will be 2 slots where most of the authors will be there signing the books you bring. This is also a great opportunity to meet everyone and ask about any problems you may have. So definitely come say hi.&lt;/p&gt;
&lt;p&gt;Again we decided on a charity that will be supported by this book. It's called &lt;a href="http://www.operationsmile.org"&gt;&lt;strong&gt;Operation Smile&lt;/strong&gt;&lt;/a&gt;. They provide free surgeries to repair cleft lip, cleft palate and other facial deformities for children around the globe. You can also help them by &lt;a href="https://secure.operationsmile.org/site/Donation2?df_id=10380&amp;amp;10380.donation=form1"&gt;&lt;strong&gt;donating&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can preorder it on at &lt;a href="http://www.manning.com/delaney/"&gt;&lt;strong&gt;Manning Publications website&lt;/strong&gt;&lt;/a&gt; or on &lt;a href="http://www.amazon.com/SQL-Server-Deep-Dives-Vol/dp/1617290475"&gt;&lt;strong&gt;Amazon&lt;/strong&gt;&lt;/a&gt;. By having it you not only get to learn a lot, improve your skills and have fun but you also help a child have a normal life. If that's not a good cause then I don't know what it is.&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/mladenp/aggbug/61362.aspx" width="1" height="1" /&gt;</description><dc:creator>Mladen Prajdić</dc:creator></item><item><title>PASS: Board Q&amp;amp;A at the Summit</title><link>http://weblogs.sqlteam.com/billg/archive/2011/10/04/pass-board-qampa-at-the-summit.aspx</link><pubDate>Wed, 05 Oct 2011 02:47:57 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/billg/archive/2011/10/04/pass-board-qampa-at-the-summit.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/billg/comments/61361.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/billg/comments/commentRss/61361.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/billg/archive/2011/10/04/pass-board-qampa-at-the-summit.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://weblogs.sqlteam.com/billg/services/trackbacks/61361.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/billg/rss.aspx">PASS: Board Q&amp;amp;A at the Summit</source><description>&lt;p&gt;The last two years we’ve put the Board in front of the members and taken questions.  We’re going to do that again this year.  It will be in Room 307/308 from 12:15 to 1:30 on Friday.&lt;/p&gt;  &lt;p&gt;Yes, this time overlaps with the Birds of a Feather Lunch and the start of afternoon sessions – but only partially.  You can attend the Q&amp;amp;A and still get to parts of both of those.  There just isn’t a great time to do this.  Every time overlaps with something. We can’t do it after the last session on Friday.  We can’t fit it between the last session and the evening events on Wednesday or Thursday.  We had some discussion around breakfast time but I didn’t think that was realistic.  This is the least bad time we could come up with.&lt;/p&gt;  &lt;p&gt;Last year we had 60-70 people attend.  These are the items that were specific things that I could work on:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The first question was whether to increase transparency around individual votes of Board members.  We approved this at the Board meeting the following day.  The only caveat was that if the Board is given confidential information as a basis for their vote then we may not be able to disclose individual votes.  Putting a Director in a position where they can’t publicly defend the reason for their vote is a difficult situation.  Thanks Kendal!&lt;/li&gt;    &lt;li&gt;Can we have a Board member discretionary fund?  As background, I took a couple of people to lunch so we could have a quiet place to talk.  I bought lunch but wasn’t able to expense it back to PASS.  We just don’t have a budget item for things like this.  I think we should.  I would guess the entire Board would like it also.  It was in an earlier version of the budget but came out as part of a cost-cutting move to balance the budget.  I’d like to see it added back in but we’ll have to see.&lt;/li&gt;    &lt;li&gt;I know there were a comments about the elections.  At this point we had created the Election Review Committee.  I’ve already written at length about this process.&lt;/li&gt;    &lt;li&gt;Where does IT work go?  PASS started to publish our internal management reports starting in December 2010.  You can find them on our &lt;a href="http://www.sqlpass.org/AboutPASS/Governance.aspx"&gt;Governance page&lt;/a&gt;.  These aren’t filtered at all and include a variety of information about IT projects.  The most recent update had roughly a page of updates related to IT.  Lots of the work was related to Summit and the Orator tool that we use to manage speaker submissions.&lt;/li&gt;    &lt;li&gt;There were numerous requests that Tina Turner not be repeated.  Done.  I don’t think we’ll do anything quite like that again.  &lt;/li&gt;    &lt;li&gt;We had a request for a payment plan for Summit.  We looked into this briefly but didn’t take any action.  We didn’t think the effort was worth the small number of people that would use it.  If you disagree, submit this on our &lt;a href="http://feedback.sqlpass.org/forums/86729-pass-summit"&gt;Summit Feedback site&lt;/a&gt; and get some votes.&lt;/li&gt;    &lt;li&gt;There were lots of suggestions around the first-timers events – especially from first timers.  You can find all our current activities related to first-timers at the &lt;a href="http://www.sqlpass.org/summit/2011/Connect/FirstTimers.aspx"&gt;First Timers page&lt;/a&gt; on the Summit web site.  Plus links to 34 (!) blog posts on suggestions for first-timers.  And a big THANK YOU to Confio and Red Gate for sponsoring this.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I hope you get the chance to attend.  These events are very helpful to me as a Board member.  I like being able to look around the room as comments are being made and see the audience reaction.  It helps me gauge the interest in an idea.&lt;/p&gt;  &lt;p&gt;I’d also like to direct you to the &lt;a href="http://feedback.sqlpass.org/forums/86729-pass-summit"&gt;Summit Feedback site&lt;/a&gt;.  You can submit and vote on ideas to make the Summit a better experience.  As of right now we have the suggestions from last year still up.  We may reset these prior to the Summit though.&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/billg/aggbug/61361.aspx" width="1" height="1" /&gt;</description><dc:creator>Bill Graziano</dc:creator></item><item><title>Summit Time!</title><link>http://weblogs.sqlteam.com/markc/archive/2011/10/02/summit-time.aspx</link><pubDate>Mon, 03 Oct 2011 06:06:11 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/markc/archive/2011/10/02/summit-time.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/markc/comments/61354.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/markc/comments/commentRss/61354.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/markc/archive/2011/10/02/summit-time.aspx#comment</comments><slash:comments>2</slash:comments><trackback:ping>http://weblogs.sqlteam.com/markc/services/trackbacks/61354.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/markc/rss.aspx">Summit Time!</source><description>&lt;p&gt;Boy, how time flies!  I can hardly believe that the &lt;a href="http://www.sqlpass.org/summit/2011/"&gt;2011 PASS Summit&lt;/a&gt; is just one week away.  Maybe it snuck up on me because it’s a few weeks earlier than last year.  Whatever the cause, I am &lt;strong&gt;really&lt;/strong&gt; looking forward to next week.  The PASS Summit is the largest SQL Server conference in the world and a fantastic networking opportunity thrown in for no additional charge.  Here are a few thoughts to help you maximize the week.&lt;/p&gt;  &lt;h3&gt;Networking&lt;/h3&gt;  &lt;p&gt;As Karen Lopez (&lt;a href="http://blog.infoadvisors.com/"&gt;blog&lt;/a&gt; | &lt;a href="http://twitter.com/#!/datachick"&gt;@DataChick&lt;/a&gt;) mentioned in &lt;a href="https://www323.livemeeting.com/cc/usergroups/view?id=K7ZSQR"&gt;her presentation&lt;/a&gt; for the &lt;a href="http://prof-dev.sqlpass.org/"&gt;Professional Development Virtual Chapter&lt;/a&gt; just a couple of weeks ago, “Don’t wait until you need a new job to start networking.”  You should always be working on your professional network.  Some people, especially technical-minded people, get confused by the term networking.  The first image that used to pop into my head was the image of some guy standing, awkwardly, off to the side of a cocktail party, trying to shmooze those around him.  That’s not what I’m talking about.  If you’re good at that sort of thing, and you can strike up a conversation with some stranger and learn all about them in 5 minutes, and walk away with your next business deal all but approved by the lawyers, then congratulations.  But if you’re not, and most of us are not, I have two suggestions for you.  First, register for Don Gabor’s 2-hour session on Tuesday at the Summit called &lt;em&gt;Networking to Build Business Contacts&lt;/em&gt;.  Don is a master at small talk, and at teaching others, and in just those two short hours will help you with important tips about breaking the ice, remembering names, and smooth transitions into and out of conversations.  Then go put that great training to work right away at the Tuesday night Welcome Reception and meet some new people; which is really my second suggestion…just meet a few new people.  You see, “networking” is about meeting new people and being friendly without trying to “work it” to get something out of the relationship at this point.  In fact, Don will tell you that a better way to build the connection with someone is to look for some way that you can help them, not how they can help you.&lt;/p&gt;  &lt;p&gt;There are a ton of opportunities as long as you follow this one key point: Don’t stay in your hotel!  At the least, get out and go to the free events such as the Tuesday night Welcome Reception, the Wednesday night Exhibitor Reception, and the Thursday night Community Appreciation Party.  All three of these are perfect opportunities to meet other professionals with a similar job or interest as you, and you never know how that may help you out in the future.  Maybe you just meet someone to say HI to at breakfast the next day instead of eating alone.  Or maybe you cross paths several times throughout the Summit and compare notes on different sessions you attended.  And you just might make new friends that you look forward to seeing year after year at the Summit.  Who knows, it might even turn out that you have some specific experience that will help out that other person a few months’ from now when they run into the same challenge that you just overcame, or vice-versa.  But the point is, if you don’t get out and meet people, you’ll never have the chance for anything else to happen in the future.&lt;/p&gt;  &lt;p&gt;One more tip for shy attendees of the Summit…if you can’t bring yourself to strike up conversation with strangers at these events, then at the least, after you sit through a good session that helps you out, go up to the speaker and &lt;strong&gt;introduce yourself&lt;/strong&gt; and thank them for taking the time and effort to put together their presentation.  Ideally, when you do this, tell them WHY it was beneficial to you (e.g. “Now I have a new idea of how to tackle a problem back at the office.”)  I know you think the speakers are all full of confidence and are always receiving a ton of accolades and applause, but you’re wrong.  Most of them will be very happy to hear first-hand that all the work they put into getting ready for their presentation is paying off for somebody.&lt;/p&gt;  &lt;h3&gt;Training&lt;/h3&gt;  &lt;p&gt;With over 170 technical sessions at the Summit, training is what it’s all about, and the training is fantastic!  Of course there are the big-name trainers like Paul Randall, Kimberly Tripp, Kalen Delaney, Itzik Ben-Gan and several others, but I am always impressed by the quality of the training put on by so many other “regular” members of the SQL Server community.  It is amazing how you don’t have to be a published author or otherwise recognized as an “expert” in an area in order to make a big impact on others just by sharing your personal experience and lessons learned.  I would rather hear the story of, and lessons learned from, “some guy or gal” who has actually been through an issue and came out the other side, than I would a trained professor who is speaking just from theory or an intellectual understanding of a topic.&lt;/p&gt;  &lt;p&gt;In addition to the three full days of regular sessions, there are also two days of pre-conference intensive training available.  There is an extra cost to this, but it is a fantastic opportunity.  Think about it…you’re already coming to this area for training, so why not extend your stay a little bit and get some in-depth training on a particular topic or two?  I did this for the first time last year.  I attended one day of extra training and it was well worth the time and money.  One of the best reasons for it is that I am extremely busy at home with my regular job and family, that it was hard to carve out the time to learn about the topic on my own.  It worked out so well last year that I am doubling up and doing two days or “pre-cons” this year.&lt;/p&gt;  &lt;p&gt;And then there are the DVDs.  I think these are another great option.  I used the &lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/BuildSchedule.aspx"&gt;online schedule builder&lt;/a&gt; to get ready and have an idea of which sessions I want to attend and when they are (much better than trying to figure this out at the last minute every day).  But the problem that I have run into (seems this happens every year) is that nearly every session block has two different sessions that I would like to attend.  And some of them have three!  ACK!  That won’t work!  What is a guy supposed to do?  Well, one option is to purchase the DVDs which are recordings of the audio and projected images from each session so you can continue to attend sessions long after the Summit is officially over.  Yes, many (possibly all) of these also get posted online and attendees can access those for no extra charge, but those are not necessarily all available as quickly as the DVD recording are, and the DVDs are often more convenient than downloading, especially if you want to share the training with someone who was not able to attend in person.&lt;/p&gt;  &lt;p&gt;Remember, I don’t make any money or get any other benefit if you buy the DVDs or from anything else that I have recommended here.  These are just my own thoughts, trying to help out based on my experiences from the 8 or so Summits I have attended.  There is nothing like the Summit.  It is an awesome experience, fantastic training, and a whole lot of fun which is just compounded if you’ll take advantage of the first part of this article and make some new friends along the way.&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/markc/aggbug/61354.aspx" width="1" height="1" /&gt;</description><dc:creator>Ajarn Mark Caldwell</dc:creator></item><item><title>PASS: Budget Status</title><link>http://weblogs.sqlteam.com/billg/archive/2011/09/27/pass-budget-status.aspx</link><pubDate>Tue, 27 Sep 2011 14:43:08 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/billg/archive/2011/09/27/pass-budget-status.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/billg/comments/61353.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/billg/comments/commentRss/61353.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/billg/archive/2011/09/27/pass-budget-status.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://weblogs.sqlteam.com/billg/services/trackbacks/61353.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/billg/rss.aspx">PASS: Budget Status</source><description>&lt;p&gt;Our budget situation is a little different this year than in years past.  We were late getting an initial budget approved.  There are a number of different reasons this occurred.  We had different competing priorities and the budget got pushed down the list.  And that’s completely my fault for not making the budget a higher priority and getting it completed on time.&lt;/p&gt;  &lt;p&gt;That left us with initial budget approval in early August rather than prior to June 30th.  Even after that there were a number of small adjustments that needed to be made.  And one large glaring mistake that needed to be fixed.  We had a typo in the budget that made it through twelve versions of review.  In my defense I can only say that the cell was red so of course it had to be negative!  And that’s one more mistake I can add to my long and growing list of Mistakes I’ll Never Make Again.&lt;/p&gt;  &lt;p&gt;Last week we passed a revised budget (version 17) with this corrected.  This is the version we’re cleaning up and posting to the web site this week or next.&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/billg/aggbug/61353.aspx" width="1" height="1" /&gt;</description><dc:creator>Bill Graziano</dc:creator></item><item><title>SSMS Tools Pack 2.0 is out! With huge productivity booster features that will blow your mind and ease your job even more.</title><link>http://weblogs.sqlteam.com/mladenp/archive/2011/09/21/ssms-tools-pack-2-0-is-out-with-huge-productivity.aspx</link><pubDate>Wed, 21 Sep 2011 16:24:40 GMT</pubDate><guid isPermaLink="true">http://weblogs.sqlteam.com/mladenp/archive/2011/09/21/ssms-tools-pack-2-0-is-out-with-huge-productivity.aspx</guid><wfw:comment>http://weblogs.sqlteam.com/mladenp/comments/61351.aspx</wfw:comment><wfw:commentRss>http://weblogs.sqlteam.com/mladenp/comments/commentRss/61351.aspx</wfw:commentRss><comments>http://weblogs.sqlteam.com/mladenp/archive/2011/09/21/ssms-tools-pack-2-0-is-out-with-huge-productivity.aspx#comment</comments><slash:comments>5</slash:comments><trackback:ping>http://weblogs.sqlteam.com/mladenp/services/trackbacks/61351.aspx</trackback:ping><source url="http://weblogs.sqlteam.com/mladenp/rss.aspx">SSMS Tools Pack 2.0 is out! With huge productivity booster features that will blow your mind and ease your job even more.</source><description>&lt;p&gt;What better way to end the summer and start those productive autumn days ahead than with a fresh new version of the SSMS Tools Pack.&lt;/p&gt;
&lt;p&gt;This is a big release with two new features that are huge productivity boosters.&lt;/p&gt;
&lt;p&gt;First new feature are &lt;strong&gt;&lt;font color="#c0504d"&gt;Tab Sessions&lt;/font&gt;&lt;/strong&gt;. Every SQL tab you open is saved every N (default 2) minutes and is stored in a session. This works similar to internet browser sessions. Once you reopen SSMS you can restores your last session with a click of a button. You even get every window connected to the server it was previously connected to. The Tab History Window looks like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/mladenp/Windows-Live-Writer/SSMS-Tools-Pack-2.0-is-out-With-huge-pr_C754/TSH_2.png"&gt;&lt;img width="918" height="298" title="TSH" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" alt="TSH" border="0" src="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/mladenp/Windows-Live-Writer/SSMS-Tools-Pack-2.0-is-out-With-huge-pr_C754/TSH_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The second feature is &lt;strong&gt;&lt;font color="#c0504d"&gt;Execution Plan Analyzer&lt;/font&gt;&lt;/strong&gt;. It is designed to quickly help you &lt;strong&gt;find costliest operators&lt;/strong&gt; by a number of properties. If that's not enough you can easily &lt;strong&gt;&lt;font color="#000000"&gt;search through the whole execution plan&lt;/font&gt; &lt;/strong&gt;for whatever you like.     &lt;br /&gt;
And to top it off you can &lt;strong&gt;auto analyze the execution plan&lt;/strong&gt;. The analysis reports various problems the execution plan has and suggests a most common solution. The ultimate purpose of the Execution Plan Analyzer is to make your troubleshooting quicker and easier. It uses a simple user interface that is easy to navigate and is built directly into the execution plan itself. The execution plan analyzer looks like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/mladenp/Windows-Live-Writer/SSMS-Tools-Pack-2.0-is-out-With-huge-pr_C754/SQLEPA_2.png"&gt;&lt;img width="591" height="463" title="SQLEPA" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" alt="SQLEPA" border="0" src="http://weblogs.sqlteam.com/images/weblogs_sqlteam_com/mladenp/Windows-Live-Writer/SSMS-Tools-Pack-2.0-is-out-With-huge-pr_C754/SQLEPA_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Smaller fixes include a completely redesigned SQL History Search window and various other bug fixes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You can download the new version 2.0 at the &lt;a href="http://www.ssmstoolspack.com/Download"&gt;&lt;u&gt;Download page&lt;/u&gt;&lt;/a&gt;. &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For more detailed feature descriptions go to the main &lt;a href="http://www.ssmstoolspack.com/Features"&gt;&lt;u&gt;Features Page&lt;/u&gt;&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Enjoy it!&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/mladenp/aggbug/61351.aspx" width="1" height="1" /&gt;</description><dc:creator>Mladen Prajdić</dc:creator></item></channel></rss>
