<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'SQL Server 2012' and 'Productivity'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=SQL+Server+2012,Productivity&amp;orTags=0</link><description>Search results matching tags 'SQL Server 2012' and 'Productivity'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>The Year That Was - 2012</title><link>http://sqlblog.com/blogs/kevin_kline/archive/2012/12/31/the-year-that-was-2012.aspx</link><pubDate>Mon, 31 Dec 2012 19:31:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:46909</guid><dc:creator>KKline</dc:creator><description>&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;2012 was, simply stated, a year that kicked my butt. &amp;nbsp;When I wasn't struggling professionally, I was struggling personally. &amp;nbsp;Health issues, culminating in a diagnosis of Type II diabetes, and the passing of my father soon after Thanksgiving marked my biggest struggles. &amp;nbsp;I apologize to those of you who are normally on my Christmas card list for not sending any this year. The wind was not in my sails. &amp;nbsp;On the positive side of the ledger, I made a scary but exciting leap to&amp;nbsp;&lt;a title="SQL Server and Windows Tools for the IT Professional that Knows Better" href="http://sqlsentry.net/"&gt;SQL Sentry&lt;/a&gt;&amp;nbsp;midyear. This was a huge shake-up after 10 years with my previous employer, but one which has been met with unbridled enthusiasm everywhere I've gone. &amp;nbsp;Thank you for the handshakes, high-fives, and hugs! &amp;nbsp;We're doing some really exciting things at SQL Sentry (such as&amp;nbsp;&lt;a href="http://sqlperformance.com/"&gt;SQLPerformance.com&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a title="SQL Sentry Plan Explorer and Plan Explorer Pro" href="http://www.sqlsentry.net/plan-explorer/sql-server-query-view.asp"&gt;Plan Explorer Pro&lt;/a&gt;) and I hope to engage with you more than ever in 2013.&lt;/p&gt;&lt;h2 style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;Blogging Activity, Plus Leadership Skills &amp;amp; Professionalism&lt;/h2&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;2012 marked a bit of a shift in my content creation direction. &amp;nbsp;I've seen an uptick in struggles in the non-IT part of our career - communications, leadership, motivation, goal-keeping, all of those sort of things. &amp;nbsp;I feel like I have some wisdom to contribute in that space. &amp;nbsp;So, in addition to technical blog posts, I been putting down more of my experiences and lessons learned on the interpersonal side of the IT career path. &amp;nbsp;My top ten blog posts for the year reflect some of that new direction:&lt;/p&gt;&lt;ul style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;li&gt;&lt;a href="http://kevinekline.com/2012/08/13/do-you-have-one-of-the-three-ws-to-sit-on-a-board-of-directors/"&gt;Do You Have One of "the Three W’s" to Sit on a Board of Directors?&lt;/a&gt;&amp;nbsp; -- Important tips for any IT pro considering a role in strategy and executive leadership.&lt;/li&gt;&lt;li&gt;&lt;a href="http://kevinekline.com/2012/09/05/timewarp-what-is-a-relational-database/"&gt;Timewarp: What Is a Relational Database?&lt;/a&gt;&amp;nbsp;-- With all the talk about NoSQL databases, let's go back to the fundamentals.&lt;/li&gt;&lt;li&gt;&lt;a href="http://kevinekline.com/2012/02/22/want-another-reason-to-hate-itunes/"&gt;Want Another Reason to Hate iTunes?&lt;/a&gt;&amp;nbsp;-- A throw-away article that precipitated a maelstrom of comments. Them Apple fanboys are&amp;nbsp;&lt;em&gt;passionate!&lt;/em&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://kevinekline.com/2012/03/09/why-do-it-pros-make-awful-managers/"&gt;Why Do IT Pros Make Awful Managers?&lt;/a&gt;&amp;nbsp;-- Not all IT pros make awful managers, but when they're awful it's often for similar reasons.&lt;/li&gt;&lt;li&gt;&lt;a href="http://kevinekline.com/2012/07/26/high-availability-white-papers-and-resources-for-sql-server/"&gt;High-Availability White Papers and Resources for SQL Server&lt;/a&gt;&amp;nbsp;-- Read the latest about AlwaysOn Availability Groups, and more.&lt;/li&gt;&lt;li&gt;&lt;a href="http://kevinekline.com/2012/04/25/new-white-paper-sql-server-extended-events-and-notifications/"&gt;New White Paper: SQL Server Extended Events and Notifications&lt;/a&gt;&amp;nbsp;-- SQL Server 2012 great augments the Extended Events feature set. Find out how.&lt;/li&gt;&lt;li&gt;&lt;a href="http://kevinekline.com/2012/05/03/build-your-own-microsoft-operations-manager-pack/"&gt;Build Your Own Microsoft Operations Management Pack&lt;/a&gt;&amp;nbsp;-- Resources to build out your own SCOM management pack.&lt;/li&gt;&lt;li&gt;&lt;a href="http://kevinekline.com/2012/09/12/help-me-update-the-history-of-sql-server/"&gt;Help Me Update the History of SQL Server&lt;/a&gt;&amp;nbsp;-- I started with SQL Server when it was still an OS/2 product. Jeesh! Lots of versions have come out since then.&lt;/li&gt;&lt;li&gt;TIE:&amp;nbsp;&lt;a href="http://kevinekline.com/2012/06/28/recorded-webcast-available-extend-scom-to-optimize-sql-server-performance-management/"&gt;Recorded Webcast Available: Extend SCOM to Optimize SQL Server Performance Management&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://kevinekline.com/2012/03/19/the-experts-conference-tec-for-ad-sharepoint-exchange-powershell-and-other-admins/"&gt;The Expert's Conference (TEC) - For AD, SharePoint, Exchange, PowerShell and Other Admins&lt;/a&gt;&amp;nbsp;-- Pointers to a webcast about extending SCOM and the TEC conference.&lt;/li&gt;&lt;li&gt;&lt;a href="http://kevinekline.com/2012/07/11/a-fond-farewell-to-quest-software/"&gt;A Fond Farewell to Quest Software&lt;/a&gt;&amp;nbsp;-- I learned&amp;nbsp;&lt;em&gt;so much&lt;/em&gt;&amp;nbsp;in 10 years at Quest Software.&lt;/li&gt;&lt;/ul&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;As I mentioned in the opening paragraph about blogging, I'm putting more energy into best practices for professional growth among IT pros. &amp;nbsp;Along those lines of thought, I started a website called&amp;nbsp;&lt;a href="http://www.foritpros.com/"&gt;ForITPros.com&lt;/a&gt;&amp;nbsp;with my long-time friend Joe Webb (&lt;a href="https://twitter.com/#!/joewebb"&gt;Twitter&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a target="_blank" href="http://www.webbtechsolutions.com/blog"&gt;Blog&lt;/a&gt;) and, in partnership with&amp;nbsp;&lt;a href="http://www.sswug.org/"&gt;SSWUG&lt;/a&gt;, developed a 2-DVD set and streaming media class called&amp;nbsp;&lt;a title="Kevin E. Kline's Leadership Skills for IT Professionals" href="http://www.vconferenceonline.com/event/sessions.aspx?id=671"&gt;Leadership Skills for IT Professionals&lt;/a&gt;&amp;nbsp;containing 14 hours of leadership and soft skills training specifically crafted for IT teams.&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;I've also been working with PASS on the Professional Development Virtual Chapter (VC), led by Mark Caldwell (&lt;a href="http://twitter.com/ajarnmark"&gt;Twitter&lt;/a&gt;). &amp;nbsp;We've already got a full year of content schedule and are trying to figure out how fit in more sessions. &amp;nbsp;Maybe moving to more than one webcast per month? &amp;nbsp;The&amp;nbsp;&lt;a href="http://professionaldevelopment.sqlpass.org/Blog/authorid/33179.aspx"&gt;PASS Professional Development VC archive&lt;/a&gt;&amp;nbsp;has lots of great content for you to review and future sessions are detailed at the&amp;nbsp;&lt;a href="http://professionaldevelopment.sqlpass.org/"&gt;PASS Professional Development VC homepage&lt;/a&gt;.&lt;/p&gt;&lt;h2 style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;In-Person Activity&lt;/h2&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;2012 was busy where I actually appeared in person or put in a big effort to write or create content. &amp;nbsp;Here's a run-down: Articles (2),&amp;nbsp;Conference Spoken (12),&amp;nbsp;Customer Calls (88),&amp;nbsp;Customer Visits (4),&amp;nbsp;Magazine Columns (14) at&amp;nbsp;&lt;a href="http://www.sqlmag.com/blogcontent/seriespath/tool-time-blog-16"&gt;SQLMag.com&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://www.dbta.com/Authors/3536-Kevin-Kline.htm"&gt;DBTA.com&lt;/a&gt;,&amp;nbsp;&lt;a href="http://kevinekline.com/bibliography/"&gt;New Books (1) with Ross Mistry&lt;/a&gt;, PASS Chapter Presentations (12),&amp;nbsp;Pre-cons/Full-day Seminars (4),&amp;nbsp;&lt;a title="SQL Saturday, presented by the Professional Association for SQL Server" href="http://www.sqlsaturday.com/"&gt;SQL Saturdays&lt;/a&gt;&amp;nbsp;(4),&amp;nbsp;&lt;a title="SQL Server Worldwide User Group" href="http://www.sswug.org/"&gt;SSWUG&lt;/a&gt;&amp;nbsp;Sessions (4), TechNet Radio Broadcasts (2), Technical Book Reviews (3), and&amp;nbsp;Webcasts (10).&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;In 2013, I expect to travel a bit less. &amp;nbsp;But I also expect to do many more webcasts. &amp;nbsp;Let me know if you have some ideas about what you'd like to learn! &amp;nbsp;One business trip that I refuse to give up, though, is&amp;nbsp;&lt;a href="http://sqlcruise.com/2013-cruises/"&gt;SQLCruise&lt;/a&gt;. &amp;nbsp;(Register!) &amp;nbsp;I know it sounds like the&amp;nbsp;&lt;em&gt;worst possible way to learn&lt;/em&gt;. I mean who'd want to learn on a cruise ship in the Caribbean?!? &amp;nbsp;(I hope you could detect the sarcasm dripping from those two sentences.) &amp;nbsp;But here are two favorite aspects of of SQLCruise that are totally ferreals - 1) You simultaneously can relax and focus on learning. &amp;nbsp;You are disconnected from the mainland. &amp;nbsp;You don't have to worry about the mobile phone going off. &amp;nbsp;2) You get extended ours in a intimate setting with&amp;nbsp;&lt;em&gt;the top talent in the SQL Server world&lt;/em&gt;. &amp;nbsp;It's always a pleasure to attend a conference session from the best in the industry. &amp;nbsp;But you'll get&amp;nbsp;&lt;em&gt;hours&amp;nbsp;&lt;/em&gt;of time to talk with these veterans of the industry about your specific problems and situations. &amp;nbsp;It just doesn't get better than that.&lt;/p&gt;&lt;h2 style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;Social Media&lt;/h2&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;It's hard to believe that only a year ago,&amp;nbsp;2011, was my first year on&amp;nbsp;&lt;a title="Kevin Kline's twitter feed" href="http://twitter.com/kekline"&gt;Twitter&lt;/a&gt;. By years end, here's where my stats had moved: 5,507 tweets (up from 3,452 tweets), 661 following (up from 531), &amp;nbsp;and 3,720 followers (up from 2,656) . &amp;nbsp;I didn't check my social media numbers last year, so I've got no point of comparison. But I'm currently sitting at 2,327 LinkedIn connections and 1,157 Facebook friends. &amp;nbsp;One of my standing policies on Facebook is that I don't "friend" someone who I haven't personally met. &amp;nbsp;That doesn't help detangle the hopeless mess I've created by having only one identify on Facebook, both personal and public. &amp;nbsp;So, on the one hand, I owe all of my longtime friends a big apology for all of the SQL talk and, on the other hand, a big apology to all of my professional friends for not posting&amp;nbsp;&lt;em&gt;enough&amp;nbsp;&lt;/em&gt;news and advice while dilute my status updates with personal minutia. Oh well - it is what it is.&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;My blogging activity for 2012 was the lowest it's been in many years, down to 44 entries, down from 77 in 2011 and well into the hundreds in 2010. &amp;nbsp;My answer to that sort of&amp;nbsp;doldrums for 2013 is to get sloppy! And by that, I mean less of a perfectionist and more of a content machine that&amp;nbsp;&lt;em&gt;just cranks it out&lt;/em&gt;! &amp;nbsp;Most of you, as my readers, have been very forgiving of a misplaced verb, a missing punctuation, or -heck- a totally malformed sentence that makes no sense at all. &amp;nbsp;So I'm going to try much harder to churn through&amp;nbsp;the 700+ nascent blog posts in my notes folder and get those ideas out there!&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;I hope to see you following me on&amp;nbsp;&lt;a title="Kevin Kline's twitter feed" href="http://twitter.com/kekline"&gt;Twitter&lt;/a&gt;&amp;nbsp;soon! Thanks,&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;-Kevin&lt;/p&gt;</description></item><item><title>Let's Talk Licensing and Virtualization for SQL Server</title><link>http://sqlblog.com/blogs/kevin_kline/archive/2012/12/13/let-s-talk-licensing-and-virtualization-for-sql-server.aspx</link><pubDate>Thu, 13 Dec 2012 19:23:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:46647</guid><dc:creator>KKline</dc:creator><description>&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;I have two new articles up on&amp;nbsp;&lt;a title="Database Trends &amp;amp; Applications magazine" href="http://www.dbta.com/"&gt;Database Trends &amp;amp; Applications magazine&lt;/a&gt;. &amp;nbsp;I'd love to get your thoughts and feedback!&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;a href="http://www.dbta.com/Articles/Columns/SQL-Server-Drill-Down/Welcome-to-the-Weird-Wild-World-of-Licensing-86588.aspx"&gt;&lt;br&gt;&lt;/a&gt;&lt;/p&gt;&lt;h2 style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;Welcome to the Weird, Wild World of SQL Server Licensing&lt;/h2&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;Not long in the past, SQL Server licensing was an easy and straightforward process. You used to take one of a few paths to get your SQL Server licenses. The first and easiest path was to buy your SQL Server license with your hardware. Want to buy a HP Proliant DL380 for a SQL Server application? Why not get your SQL Server Enterprise Edition license with it at the same time? Just pay the hardware vendor for the whole stack, from the bare metal all the way through to the Microsoft OS and SQL Server....&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;a id="ctl00_ContentPlaceHolder1_ctl00_ctl00_rptArticles_ctl01_IssueName" href="http://www.dbta.com/Newsletters/DBTA-E-Edition"&gt;DBTA E-Edition&lt;/a&gt;&amp;nbsp;-&amp;nbsp;&lt;a id="ctl00_ContentPlaceHolder1_ctl00_ctl00_rptArticles_ctl01_ArticleIssue" href="http://www.dbta.com/Newsletters/DBTA-E-Edition/3644-December-2012.htm"&gt;December 2012 Issue&lt;/a&gt;&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;a href="http://www.dbta.com/Articles/Columns/SQL-Server-Drill-Down/Virtualization-Conquers-the-Database-86186.aspx"&gt;&lt;br&gt;&lt;/a&gt;&lt;/p&gt;&lt;h2 style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;Virtualization Conquers the Database&lt;/h2&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;I was privileged to deliver a session entitled Managing SQL Server in a Virtual World at the PASS Summit 2012, the largest annual conference for Microsoft SQL Server. It was a packed house, literally at standing-room-only capacity. I delivered the session with my friend David Klee and we were swarmed by attendees after the session wrapped up. With almost 600 people in the room, we conducted one of those informal polls that speakers like to do along the lines of "Raise your hands if …" and the informal findings were very telling. Probably around 90% of the attendees used VMware and SQL Server in some capacity and at least 60% used it in production environments. Another important fact was that only 10% of the attendees were actually able to get information on the performance of the actual VMs themselves. Most had to get all of their information and support from the VM / System administration staff....&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;a id="ctl00_ContentPlaceHolder1_ctl00_ctl00_rptArticles_ctl03_IssueName" href="http://www.dbta.com/Newsletters/DBTA-E-Edition"&gt;DBTA E-Edition&lt;/a&gt;&amp;nbsp;-&amp;nbsp;&lt;a id="ctl00_ContentPlaceHolder1_ctl00_ctl00_rptArticles_ctl03_ArticleIssue" href="http://www.dbta.com/Newsletters/DBTA-E-Edition/3600-November-E-Edition.htm"&gt;November E-Edition Issue&lt;/a&gt;&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;a href="http://twitter.com/kekline"&gt;Follow me on Twitter!&lt;/a&gt;&lt;/p&gt;</description></item><item><title>T-SQL Tuesday #25 : T-SQL Tips 'n' Tricks</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2011/12/13/t-sql-tuesday-25-t-sql-tips-n-tricks.aspx</link><pubDate>Tue, 13 Dec 2011 18:50:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:40359</guid><dc:creator>AaronBertrand</dc:creator><description>
&lt;p&gt;&lt;a href="http://sqlblog.com/blogs/allen_white/archive/2011/12/05/t-sql-tuesday-025-invitation-to-share-your-tricks.aspx" title="http://sqlblog.com/blogs/allen_white/archive/2011/12/05/t-sql-tuesday-025-invitation-to-share-your-tricks.aspx" target="_blank"&gt;&lt;img src="http://sqlblog.com/files/folders/36686/download.aspx" style="padding:0px 30px 12px 30px;" align="right" border="0" height="135" width="135"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This month's T-SQL Tuesday is being hosted by Allen White (&lt;a href="http://twitter.com/SQLRunr" title="http://twitter.com/SQLRunr" target="_blank"&gt;@SQLRunr&lt;/a&gt;) and is about &lt;a href="http://sqlblog.com/blogs/allen_white/archive/2011/12/05/t-sql-tuesday-025-invitation-to-share-your-tricks.aspx" title="http://sqlblog.com/blogs/allen_white/archive/2011/12/05/t-sql-tuesday-025-invitation-to-share-your-tricks.aspx" target="_blank"&gt;sharing your T-SQL tips and tricks&lt;/a&gt;. Since I know many people will share their T-SQL magic and wizardry, I thought I would share a couple of productivity tips - so still T-SQL related, but more how to take advantage of some features in SSMS.&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="4"&gt;Drag column list onto your query window&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;Whenever I give my Bad Habits to Kick presentation, I remind people that - even if they're not using 3rd party code completion tools (many of which offer SELECT * expansion) - there's little excuse to use SELECT *. This is because Management Studio makes it very easy to list out all of your columns in one motion. I'm always amazed when I ask how many people didn't already know about this - and most times it's more than half the room. &lt;br&gt;&lt;/p&gt;
&lt;div&gt;The process is quite simple - expand your table, click on the Columns node, drag it onto your query window and let go:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="margin-left:40px;"&gt;&lt;img src="http://bertrandaaron.files.wordpress.com/2011/12/tst-1.png" border="0" height="284" width="721"&gt; &lt;/div&gt;&lt;div style="margin-left:40px;"&gt;&lt;br&gt;&lt;img src="http://bertrandaaron.files.wordpress.com/2011/12/tst-2.png"&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;Now, it's probably not in the exact format you want, it won't properly delimit any [keyword] or [reserved word] you use for a column name, and you'll have to do this multiple times when you're performing a join (and you'll have to add your own table/alias prefixes to each column as well). But I'd rather spend time using TAB and ENTER to correct formatting than to try and type out all the column names individually.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;font size="4"&gt;Use snippets&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;If you find yourself writing the same type of code over and over again, the new snippets feature in SQL Server 2012 will likely be very useful for you. What does this have over templates? For one, I find it much easier to use once you have your snippets created. There is no hokey VB6-style dialog to perform token replacements, and you can actually store all your custom snippets in a network location - so if you want to enforce coding standards you have a fighting chance by pointing everyone's SSMS at the same snippet location. I'll be honest, though, setting up the template is a bit of a pain - you need to hand-massage XML manually because as of yet there is no easy way to generate these from within Management Studio. But once they're in place, they're very easy to work with. Just right-click within the query window, choose "Insert Snippet", and follow the rabbit:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="margin-left:40px;"&gt;&lt;img src="http://bertrandaaron.files.wordpress.com/2011/12/tnt-3.png" border="0" height="148" width="697"&gt;&lt;/div&gt;&lt;div style="margin-left:40px;"&gt;&amp;nbsp; &lt;br&gt;&lt;/div&gt;&lt;div&gt;One of the pieces of code I write a lot for administrative tasks (or for helping folks out in the wild) is a cursor. I tend to have a hard time memorizing the options I always try to use to make a cursor as efficient as possible (something else I cover in my Bad Habits to Kick presentation). The snippet eliminates this problem. Once I've selected the "Declare Cursor" snippet I've saved, I get the following in my query window:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="margin-left:40px;"&gt;&lt;img src="http://bertrandaaron.files.wordpress.com/2011/12/tnt-4.png" border="0" height="544" width="444"&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="margin-left:40px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;You'll notice in the diagram that "c" is currently highlighted and the cursor is there; all other instances of "c" are lightly outlined. I can type any name I want to overwrite "c" and, once I hit tab (which moves me to the next token), it will replace all instances of that token with the new name I've typed. So this is a little easier to work with than the floating window in templates, though you lose this easy editing capability if you start doing other things with the script first (need to remind myself to file a bug or suggestion about that). Changing "c" to "x" throughout this code sample took two keystrokes, and I'm ready to add the actual query:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="margin-left:40px;"&gt;&lt;span style="text-decoration:line-through;"&gt;&lt;img src="http://bertrandaaron.files.wordpress.com/2011/12/tnt-5.png" border="0" height="544" width="444"&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;

I plan to write a much more thorough blog post on the snippets feature, because I think it will become a pretty popular time saver once the latest version of Management Studio becomes more common on the desktop. In the meantime, if you're already playing with SQL Server 2012 RC0, I highly recommend you check this feature out!&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;font size="4"&gt;Avoid dynamic SQL in generated scripts&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;I see a lot of people complain that when they script objects from Management Studio the object text ends up in dynamic SQL. I don't blame them - this makes it very cumbersome to read, never mind modify, the object text before copying, running or saving the script.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;In SQL Server 2008 R2, this is controlled by the option Tools &amp;gt; Options &amp;gt; SQL Server Object Explorer&amp;gt; Scripting &amp;gt; Include IF NOT EXISTS clause:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-left:40px;"&gt;&lt;img src="http://bertrandaaron.files.wordpress.com/2011/12/tnt-6a.png" border="0" height="440" width="610"&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;In SQL Server 2012, the option has changed slightly to Tools &amp;gt; Options &amp;gt; SQL Server Object Explorer &amp;gt; Scripting &amp;gt; Check for Object Existence:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="margin-left:40px;"&gt;&lt;img src="http://bertrandaaron.files.wordpress.com/2011/12/tnt-7a.png" border="0" height="440" width="636"&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;Why did it change? Because, depending on the action, it actually performs an IF EXISTS check (e.g. for a DROP or ALTER), not always an IF NOT EXISTS check (for a CREATE). Some background in the following Connect items:&lt;br&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="margin-left:40px;"&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/242799" title="http://connect.microsoft.com/SQLServer/feedback/details/242799" target="_blank"&gt;http://connect.microsoft.com/SQLServer/feedback/details/242799&lt;/a&gt; &lt;br&gt;&lt;/div&gt;&lt;div style="margin-left:40px;"&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/264310" title="http://connect.microsoft.com/SQLServer/feedback/details/264310" target="_blank"&gt;http://connect.microsoft.com/SQLServer/feedback/details/264310&lt;/a&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-left:40px;"&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/624075" title="http://connect.microsoft.com/SQLServer/feedback/details/624075" target="_blank"&gt;http://connect.microsoft.com/SQLServer/feedback/details/624075&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;(As an aside, I think it's funny that they call the options category "SQL Server Object Explorer" - good thing they're specific, because you might get it confused with the Lego Object Explorer, Oracle Object Explorer or Windows Explorer Object Explorer.)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;In any case, when these options are set to True, the scripts you generate often yield dynamic SQL, and even when they're set to false they still sometimes perform the check for existence (specifically in 2008 R2). Here is a brief wireframe of the options and how they affect each scripting method:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="margin-left:40px;"&gt;&lt;img src="http://bertrandaaron.files.wordpress.com/2011/12/tnt-8.png" border="1" height="243" width="784"&gt;&amp;nbsp;&lt;br&gt;&lt;/div&gt;
&lt;p&gt;Note that with the "DROP and CREATE" option, the existence check for the CREATE is unnecessary - after all, if the object already exists, the script should have just dropped the object (though both checks may have failed if there is an object with the same name that is *not* a procedure). In general, most people won't want to perform a DROP and CREATE anyway - they lose dependencies and permissions when they do this (though permissions can be scripted with a different option in the same category). Until they develop "CREATE or REPLACE" functionality (&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/127219/create-or-replace" title="Connect #127219 : Create or Replace" target="_blank"&gt;please vote and comment!&lt;/a&gt;), ideally you should have a script that creates a stub for the object only if it doesn't already exist, then runs an ALTER - then you don't have to re-apply permissions, you don't have to worry about whether the object already exists, and as an added bonus you retain dependency chains. So your scripts can look like this (still using dynamic SQL, but it's very simple and doesn't present parsing or reading issues):&lt;/p&gt;

&lt;blockquote&gt;
&lt;table bgcolor="#eeeeee" cellpadding="0" cellspacing="0"&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre style="padding:10px 20px;font-size:12px;font-family:consolas,lucida console,courier new,courier;-moz-background-inline-policy:continuous;"&gt;&lt;font color="blue"&gt;IF &lt;/font&gt;&lt;font color="magenta"&gt;OBJECT_ID&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="red"&gt;'dbo.proc_name'&lt;/font&gt;&lt;font color="gray"&gt;) &lt;/font&gt;&lt;font color="gray"&gt;IS NULL&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;BEGIN&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EXEC &lt;/font&gt;&lt;font color="darkred"&gt;sp_executesql &lt;/font&gt;&lt;font color="red"&gt;N'CREATE PROCEDURE dbo.proc_name AS SELECT 1;'&lt;/font&gt;&lt;font color="gray"&gt;;&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;END&lt;br&gt;GO&lt;/font&gt;&lt;font color="black"&gt;&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;ALTER PROCEDURE &lt;/font&gt;&lt;font color="black"&gt;dbo.proc_name&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;AS&lt;/font&gt;&lt;font color="green"&gt;&lt;br&gt;... -- actual script body from source control or elsewhere goes here&lt;/font&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/blockquote&gt;

&lt;p&gt;Unfortunately there is no way to train SSMS to do this today, unless you write a scripting add-in.&lt;br&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;font size="4"&gt;Wrapping up&lt;/font&gt;&lt;br&gt;&lt;br&gt;I hope that at least one of these little tricks helps you in some way. It's always fun participating in T-SQL Tuesday, even if I'm often trying to bend the rules a little bit.&lt;br&gt;&amp;nbsp;&lt;br&gt;&lt;/p&gt;</description></item></channel></rss>