<?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>The Rambling DBA: Jonathan Kehayias : SQL Quiz</title><link>http://sqlblog.com/blogs/jonathan_kehayias/archive/tags/SQL+Quiz/default.aspx</link><description>Tags: SQL Quiz</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>5 Things SQL Server should get rid of</title><link>http://sqlblog.com/blogs/jonathan_kehayias/archive/2010/05/11/5-things-sql-server-should-get-rid-of.aspx</link><pubDate>Wed, 12 May 2010 02:12:42 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:25064</guid><dc:creator>Jonathan Kehayias</dc:creator><slash:comments>4</slash:comments><comments>http://sqlblog.com/blogs/jonathan_kehayias/comments/25064.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/jonathan_kehayias/commentrss.aspx?PostID=25064</wfw:commentRss><description>Paul Randal ( blog | twitter ) started a new meme last night with his blog post &amp;quot; What 5 things should SQL Server get rid of? &amp;quot; A few bloggers have posted their top 5 lists, so here is mine. Creating Foreign Keys without mentioning Indexes This...(&lt;a href="http://sqlblog.com/blogs/jonathan_kehayias/archive/2010/05/11/5-things-sql-server-should-get-rid-of.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=25064" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/jonathan_kehayias/archive/tags/SQL+Quiz/default.aspx">SQL Quiz</category></item><item><title>What three events?</title><link>http://sqlblog.com/blogs/jonathan_kehayias/archive/2010/02/02/what-three-events.aspx</link><pubDate>Tue, 02 Feb 2010 04:14:50 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:21697</guid><dc:creator>Jonathan Kehayias</dc:creator><slash:comments>6</slash:comments><comments>http://sqlblog.com/blogs/jonathan_kehayias/comments/21697.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/jonathan_kehayias/commentrss.aspx?PostID=21697</wfw:commentRss><description>Two weeks ago Paul Randal started a chain blog series on What three events brought you here? &amp;#160; He tagged Brent Ozar, who in turn tagged me in his post You may ask yourself, How did I get here? &amp;#160; So here’s my own take on this topic. Event #1:...(&lt;a href="http://sqlblog.com/blogs/jonathan_kehayias/archive/2010/02/02/what-three-events.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=21697" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/jonathan_kehayias/archive/tags/SQL+Quiz/default.aspx">SQL Quiz</category></item><item><title>SQL Quiz: My relative path to Geekdom</title><link>http://sqlblog.com/blogs/jonathan_kehayias/archive/2009/09/08/sql-quiz-my-relative-path-to-geekdom.aspx</link><pubDate>Tue, 08 Sep 2009 04:14:07 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:16646</guid><dc:creator>Jonathan Kehayias</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/jonathan_kehayias/comments/16646.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/jonathan_kehayias/commentrss.aspx?PostID=16646</wfw:commentRss><description>I got tagged in another SQL Quiz going around, this time by Mr. Denny ( Blog / Twitter ).&amp;#160; I tried to come up with some kind of witty title for this post and as usual I lacked the ability.&amp;#160; My wife recommended using a story like the guy on The...(&lt;a href="http://sqlblog.com/blogs/jonathan_kehayias/archive/2009/09/08/sql-quiz-my-relative-path-to-geekdom.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=16646" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/jonathan_kehayias/archive/tags/SQL+Quiz/default.aspx">SQL Quiz</category></item><item><title>SQL Quiz: Here on Gilligan's Isle</title><link>http://sqlblog.com/blogs/jonathan_kehayias/archive/2009/06/14/sql-quiz-here-on-gilligan-s-isle.aspx</link><pubDate>Mon, 15 Jun 2009 01:39:29 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:14665</guid><dc:creator>Jonathan Kehayias</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/jonathan_kehayias/comments/14665.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/jonathan_kehayias/commentrss.aspx?PostID=14665</wfw:commentRss><description>&lt;p&gt;It happened again, only this time Tim Ford is the &lt;strike&gt;antagonist&lt;/strike&gt; initiator,&amp;#160; instead of Chris Shaw.&amp;#160; Once again a chain blog question is circulating around the SQL Server community.&amp;#160; This time I was tagged by &lt;a href="http://facility9.com" target="_blank"&gt;Jeremiah Peschka&lt;/a&gt;.&amp;#160; I have to admit, that I really find these questions interesting and it is neat to read other peoples responses to topics like the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;So You&amp;#8217;re On A Deserted Island With WiFi and you&amp;#8217;re still on the clock at work. Okay, so not a very good situational exercise here, but let&amp;#8217;s roll with it; we&amp;#8217;ll call it a virtual deserted island. Perhaps what I should simply ask is if you had a month without any walk-up work, no projects due, no performance issues that require you to devote time from anything other than a wishlist of items you&amp;#8217;ve been wanting to get accomplished at work but keep getting pulled away from I ask this question: what would be the top items that would get your attention?&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;For me, this actually took a bit of time to think about.&amp;#160; If I had an uninterrupted month on a deserted island with WIFI, I actually probably wouldn't get all that much farther in accomplishing things.&amp;#160; This is simply due to the fact that I still have WIFI, and my uncontrolled ADD would have me browsing the MSDN Forums and Google Reader, and the rest of the Internet, and I would invariable get distracted by something else if it wasn't something work related.&amp;#160; I am a realist.&amp;#160; However, given that this is a fictitious scenario and not likely to happen here is what I would like to accomplish:&lt;/p&gt;  &lt;h3&gt;Hardware Configuration&lt;/h3&gt;  &lt;p&gt;Ever since I got my own testing server for home, this has been a big thing for me.&amp;#160; I can't believe how little I knew about configuring and installing a server from the bare bones hardware up to having a completely running SQL Server.&amp;#160; Granted, I have learned a whole lot in the last month from a lot of trial and error, but I know that there is a whole lot more out there to learn, and if I had the money and hardware I'd be all over it right now.&amp;#160; I'm really interested in how really large servers like a half dome and IA64 with Hardware NUMA get configured, proper SAN configuration for high IOPS throughput, and how queue depth actually affects performance.&amp;#160; Sure I have read about these things on blogs, but I am a hands on kind of person.&amp;#160; You can show me all day long, and I can read about it until the cows come home, but until I actually get my hands dirty and perform the task, I haven't really learned all that much.&amp;#160; I know where to look for information for reference should I ever actually need it, but I don't really know it, know it.&lt;/p&gt;  &lt;h3&gt;*nix Administration and Management&lt;/h3&gt;  &lt;p&gt;This one really leads into the next one, but when I got my first job in the corporate world, working in a ATT Wireless call center, I got my first experiences with *nix environments though it wasn't really much of an experience building kind of job.&amp;#160; It was a few years later when I was working in an Internet Help Desk job that actually got to learn about Linux and work inside of a shell environment.&amp;#160; I still remember a bit from those days, and this was beneficial in my current position where I back fill for the Oracle DBA when he is on vacation or out of the office for training.&amp;#160; Having at least a rudimentary knowledge of the *nix environment is definitely a plus in my opinion.&amp;#160; It also helped when I was recently configuring my test server to build a SQL Cluster on since the first iSCSI target I worked with was an open source Linux package. &lt;/p&gt;  &lt;h3&gt;Other RDBMS Systems (Oracle and PL/SQL, MySQL, etc..)&lt;/h3&gt;  &lt;p&gt;Ever since I got my first looks at Oracle and how it is used, I've noticed a big difference in programming paradigms between the Oracle developers I know, and how things are generally done in SQL Server.&amp;#160; I'd like to be able to put the time in working with PL/SQL to understand the fundamental differences in how operations are performed between the two environments.&amp;#160; For example, a lot of PL/SQL developers make heavy use of cursors and rowsets in their PL/SQL code, a common No-No in Transact-SQL.&amp;#160; I'd like to fundamentally understand whether cursors in PL/SQL really perform up the standard that they have been portrayed to, or if good set based logic in Oracle will outperform just as it does in Transact SQL.&lt;/p&gt;  &lt;p&gt;I'd also like to dig into MySQL and figure out what exactly all the muss and fuss is about.&amp;#160; Just looking at web site hosting providers, one can't deny or argue that MySQL has its heels dug into the web hosting world.&amp;#160; I'd really like to understand the fundamental differences between a &amp;quot;free&amp;quot; (its not really when you get down to the nitty gritty of things) database server and the licensed database servers in most common usage.&lt;/p&gt;  &lt;h3&gt;Data Warehousing and Business Intelligence&lt;/h3&gt;  &lt;p&gt;If you follow me on &lt;a href="http://twitter.com/sqlsarg" target="_blank"&gt;Twitter&lt;/a&gt;, this one shouldn't be a big shock.&amp;#160; I am very interested in the Business Intelligence side of databases currently, simply because its a focus point of certain projects at my company currently, and I am learning the more I get into it, that it is a completely different way of thinking about and working with data.&amp;#160; I've bought and read Ralph Kimball's book, and as I stated previously, I can read about it all day, but until I have done it, it just doesn't make sense.&amp;#160; With that in mind, I have been working on a data warehouse project recently and even as a project for work, I have only been able to dedicate 2 days in the last 2 weeks to it.&amp;#160; However, I was able to make some really good headway the last time I was able to work on it, though it will probably have to be scrapped and rebuilt from scratch at some point in the future simply because it was my first stab at it.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So that is it for me.&amp;#160; Not necessarily a lot SQL Server related, but that's what I would do, though I'd probably need to be stranded a lot longer than a month to make any kind of headway on any of these things.&amp;#160; I'm going to tag Kevin Kline and Louis Davidson with this.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=14665" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/jonathan_kehayias/archive/tags/SQL+Quiz/default.aspx">SQL Quiz</category></item><item><title>Tagged: Who has been a great leader in your Career?</title><link>http://sqlblog.com/blogs/jonathan_kehayias/archive/2009/05/05/tagged-who-has-been-a-great-leader-in-your-career.aspx</link><pubDate>Tue, 05 May 2009 14:26:25 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:13789</guid><dc:creator>Jonathan Kehayias</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/jonathan_kehayias/comments/13789.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/jonathan_kehayias/commentrss.aspx?PostID=13789</wfw:commentRss><description>&lt;p&gt;While I was gone, I was tagged by a number of the chain Quizes that have been going around the SQL Server Community, so I am working to answer each of them as I get around to it.&amp;#160; &lt;a href="http://thehobt.blogspot.com/2009/04/ive-contracted-quizitis.html" target="_blank"&gt;Aaron Alton&lt;/a&gt; tagged me for this one, and it is actually one that I already answered for the most part in a previous blog posting:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jonathan_kehayias/archive/2009/02/18/sql-quiz-the-most-influential-people-in-your-technical-success.aspx"&gt;SQL Quiz: The most influential people in your Technical Success?&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you are interested in who influenced me along the way, you can read about it there.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=13789" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/jonathan_kehayias/archive/tags/SQL+Quiz/default.aspx">SQL Quiz</category></item><item><title>SQL Quiz: The most influential people in your Technical Success?</title><link>http://sqlblog.com/blogs/jonathan_kehayias/archive/2009/02/18/sql-quiz-the-most-influential-people-in-your-technical-success.aspx</link><pubDate>Wed, 18 Feb 2009 10:06:27 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:11943</guid><dc:creator>Jonathan Kehayias</dc:creator><slash:comments>10</slash:comments><comments>http://sqlblog.com/blogs/jonathan_kehayias/comments/11943.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/jonathan_kehayias/commentrss.aspx?PostID=11943</wfw:commentRss><description>&lt;p&gt;Lately there have been a series of SQL Quizes that have circulated the blogging community.&amp;#160; Some of them are silly, &lt;a href="http://sqlblog.com/blogs/jonathan_kehayias/archive/2009/01/16/wordle-and-blog-content.aspx" target="_blank"&gt;like the Wordle one&lt;/a&gt;, and some have a purpose behind them, like &lt;a href="http://sqlblog.com/blogs/jonathan_kehayias/archive/2008/12/09/sql-quiz-1.aspx" target="_blank"&gt;the two greatest mistakes one&lt;/a&gt;.&amp;#160; I decided that since my nature is to give credit where it is due, I would be most interested in reading about the most influential people in the lives of successful SQL Server professionals.&amp;#160; &lt;/p&gt;  &lt;p&gt;I have had a number of very influential people in my life along the way, but since I am starting this project, I guess I would have to pick:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Dave Weldy / Virginia Roberts / Marshall Sutherland&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This treo of developers/DBA's are the group responsible for me being involved with SQL Server at all.&amp;#160; While I was attending college at the University of Florida, I worked for a natural gas company as a Applications and Business Analyst.&amp;#160; My primary job was working with the QA team researching bugs in the billing system and writing technical specifications for code fixes.&amp;#160; I realized pretty quickly that unless I was able to look at the data in the database, I wasn't going to be very effective at finding problems, and determining how/why they existed.&amp;#160; Dave loaned me a TSQL book and gave me a couple of basic SELECT statements to learn from in mid-2004.&amp;#160; Little did he know that he created a monster that would begin asking thousands of questions of not only him, but the other senior SQL Staff in the company as well.&amp;#160; Virginia and Marshall helped Dave answer countless questions along the way, and probably kept me from being the annoying new to SQL forums/newsgroup poster who failed to do any kind of Google search to find the solution to the problem.&lt;/p&gt;  &lt;p&gt;As a group they helped provide the foundation that I have built upon over the years.&amp;#160; I like to learn by reading existing code, and these guys were very open to allowing me to see any and all of the code that was written in the database, and they were willing to help explain complex problems like NULL which was an impossible thing for me to understand what a NULL actually represented, or didn't represent.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Arnie Rowland&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This might seem kind of funny to some people, but one of the most influential people in my technical success and development as a SQL Server profession is actually someone that I have only had the pleasure of meeting face to face twice.&amp;#160; For those who know Arnie this won't be any sort of a surprise.&amp;#160; Arnie is a fellow MVP and Moderator on the MSDN Forums.&amp;#160; Last year Arnie personally took it upon himself to organize a group from the frequent contributors to the SQL Server Forums, to include MVP's, Moderators, and Answerers and create a email distribution list where we could communicate with each other when problems arise, or to get assistance on complex questions on the forums.&amp;#160; &lt;/p&gt;  &lt;p&gt;When I was asked to join this list, I wasn't a Answerer, Moderator, or MVP.&amp;#160; Joining the list allowed me to learn from the group, and Arnie personally provided mentorship to develop me from&amp;#160; a contributor to an Answerer, and then up to Moderator.&amp;#160; The increased answer rate of posts on the SQL Server forums is a testament to the success that this kind of organization has had in improving the forums experience for people.&amp;#160; In addition to forming the email list, Arnie also created the SQL Examples site as a place for Answerers/Moderators/MVP's contributing to the forums to publish articles and content that answer common problems encountered on the forums.&amp;#160; For some of us, this was the first place that we were able to contribute/publish article content online, and was a stepping stone to other opportunities to publish information.&amp;#160; &lt;/p&gt;  &lt;p&gt;I first happened to be able to meet Arnie at last years TechEd during the SQL Saturday between events where a group of forum members got together for dinner after the event.&amp;#160; It was a extremely fun time, and it was good to be able to put names to faces, not only with Arnie, but others as well.&amp;#160; The second opportunity was at PASS 2008, where I got to attend a few MVP events with Arnie.&amp;#160; One thing that Arnie did was make sure that new MVP's like Jacob Sebastian and myself, got introduced to other MVP's and members of the SQL Development team at Microsoft. Arnie also made sure that we were aware of events that were happening after hours during the Summit to ensure that we were able to maximize our visit to Seattle and have more opportunities to meet people face to face.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;One thing that I tell people who ask questions online about how to become a good DBA or Developer is to find a good mentor locally, and get under their wing.&amp;#160; I certainly have had quite a few mentors in the last 4 years and I still try and get under the wing of industry experts and glean anything I can from them.&amp;#160; However, lately I have found that rather than being mentored, that I have slowly changed over to the role of being a mentor to others.&amp;#160; One thing I learned from my mentors is that there are times to give someone the answer and provide a in depth explanation along with it, and there are times to provide enough information to allow someone to find the solution themselves.&amp;#160; For example, I once asked Dave how do I use the output from one query to query another table.&amp;#160; Now he could have easily just typed out some code showing me how to do it, but instead he recommended that I look up what a JOIN was, or how to use a subquery with the IN operator.&amp;#160; These are fundamentals in TSQL development, so I feel that I was best served by having to go find this information on my own.&amp;#160; If you are a mentor, don't always give the answer to someone immediately, and if you are being mentored, be willing to take the information provided and do a little leg work.&amp;#160; In the end you'll be better for it.&lt;/p&gt;  &lt;p&gt;So who was influential in your success as a SQL Server professional?&amp;#160; I am not going to call specific people out, but I am curious how people have influenced some of the current influencers in the community.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=11943" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/jonathan_kehayias/archive/tags/SQL+Quiz/default.aspx">SQL Quiz</category></item><item><title>SQL Quiz #1</title><link>http://sqlblog.com/blogs/jonathan_kehayias/archive/2008/12/09/sql-quiz-1.aspx</link><pubDate>Wed, 10 Dec 2008 03:54:31 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:11945</guid><dc:creator>Jonathan Kehayias</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/jonathan_kehayias/comments/11945.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/jonathan_kehayias/commentrss.aspx?PostID=11945</wfw:commentRss><description>&lt;p&gt;Ok so I made a mistake last time around, and I actually was &lt;a href="http://kendalvandyke.blogspot.com/2008/11/two-mistakes.html" target="_blank"&gt;tagged by Kendal Van Dyke&lt;/a&gt;, though I missed it back in November.&amp;#160; So in the spirit of the exercise here are my two biggest blunders in SQL Server based on the &lt;a href="http://chrisshaw.wordpress.com/2008/11/05/new-sql-quiz/"&gt;Two mistakes&lt;/a&gt; post started by &lt;a href="http://chrisshaw.wordpress.com/"&gt;Chris Shaw&lt;/a&gt; that circled the rounds of SQL bloggers in November.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Biggest Mistake...&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;While upgrading the second largest database in SQL Server at my job from SQL Server 2000 to SQL Server 2005, one that holds important financial's data for credit card reconciliation's, it was decided by the business users that a large portion of the data in the database would be archived off, and then deleted from the database.&amp;#160; At the time the database was just under 140GB in size with the majority of the data in one very large table.&amp;#160; &lt;/p&gt;    &lt;p&gt;The end users worked with the vendor to get a script to handle this operation, and in testing it, the process was going to run over 30 hrs which was not going to be possible.&amp;#160; So after some review, and discussion with the vendors support and development staff, I realized that it would be faster to create a new copy of the table, insert the rows to be kept into it, drop the old table and rename the new one, and rebuild all the constraints and indexes.&amp;#160; This took the process down to about 1/2 hr in testing.&lt;/p&gt;    &lt;p&gt;The problem came when I loaded the script on production to run the purge process.&amp;#160; In testing it, I did the operation in an explicit transaction, and initially I had left the SET IDENTITY INSERT statements out of the batch by mistake.&amp;#160; It wasn't a problem on development because I had blocked the code in an explicit transaction, so when the inserts failed because I didn't SET IDENTITY_INSERT ON, I issued a rollback, waited, and then fixed the problem.&amp;#160; For some reason, I never saved the script.&lt;/p&gt;    &lt;p&gt;Onto production, load the script, run it, and watch a 88GB table disappear in mere seconds.&amp;#160; Now I know that everyone has made a mistake at some point, and we are all familiar with that sinking hot feeling that you get in the seat of your pants when you realize it.&amp;#160; Take the worst case of that feeling you have ever had, and multiply it by a factor of 10.&lt;/p&gt;    &lt;p&gt;The good thing was I had backups, and the database was fully logged, so backup the tail log (first thing I did was let out a string of words that can not be repeated and caused the consultants in the cube next to mine to look over the wall and then take a break, but the log backup immediately followed) and then I took a quick walk to my directors office to explain the disaster I had just created, how long it would take to fix, and that I needed to take a quick walk around the parking garage to clear my head before attempting to fix it, which he agreed was probably a good idea.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Lesson Learned:&lt;/strong&gt; Save early and save often.&amp;#160; Really, I was fine, my backups existed and had been tested numerous time recently in performing mock upgrades so I knew I was able to recover from it.&amp;#160; The total impact was about 20 additional minutes of downtime over my initial estimate which had provided me ample wiggle room for a major problem requiring a restore of the database to a SQL Server 2000 instance if need be.&lt;/p&gt;    &lt;p&gt;Plan for the worst, hope for the best, but never be without a good backup.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Second biggest mistake...&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The second worst thing I have ever done in SQL Server involves a table with an audit trigger doing a SELECT * FROM Inserted.&amp;#160; This was at my previous job, and just one of a few messes I created along my road to learning SQL.&amp;#160; I was initially a Business Analyst, and in order to track problematic accounts in a new billing system I created a table that exempted accounts from billing during normal billing batches.&amp;#160; Anything kicked out during post billing QA or any new accounts were immediately inserted into this table.&amp;#160; To maintain a history of problems to ensure no account consistently had problems, an audit table was created using a revisioning trigger that tracked when the account was inserted into the table, when it was updated and then later deleted from the table, and it tracked who did it.&lt;/p&gt;    &lt;p&gt;While I was away on Army training this table was changed by a new BA who took over the job I was doing and a column was added to the table to hold the account number which existed elsewhere and was easily gotten with a join.&amp;#160; This broke every report that used this table because the column was originally distinct and did not use two part naming (mistake one).&amp;#160; When I returned my first task assignment was to fix the reports since they were important to the business users and QA department.&amp;#160; After looking at them, the problem was immediately apparent, so to fix it I just dropped that new column in production.&lt;/p&gt;    &lt;p&gt;Remember above where I said all new accounts were put immediately into this table.&amp;#160; Well dropping the column on the table without dropping it on the audit table caused an error in the trigger execution because you can't INSERT INTO AuditTable SELECT * FROM inserted without a column specification if the column lists are different.&amp;#160; This caused the transaction that created all new accounts to rollback and raise an error to the Account creation system which was in a different database.&lt;/p&gt;    &lt;p&gt;It only took about 10 minutes before I got a phone call asking if I had touched that table by one of our DBA's.&amp;#160; Total Damage 14 new accounts that had to be reentered manually in the Account creation system to send them back to the billing system.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Lesson Learned: &lt;/strong&gt;First this taught the DBA an important lesson.&amp;#160; Jon had no business having any kind of privileges in a production database environment, least of all sysadmin like I did back then.&amp;#160; Second, never change something in production that has not been completely evaluated and reviewed by your DBA staff.&amp;#160; Third, always fully qualify naming of your columns and tables in your code.&amp;#160; A simple change can break so much if you don't.&amp;#160; Forth and lastly, never do a INSERT INTO without specifying the column list, and never do a SELECT * in code like this.&amp;#160; It will break when you least expect it.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Since this was from so long ago, I won't call anyone else out on it, but if you are interested, call yourself out, and post your two biggest mistakes.&amp;#160; Leave me a comment, and I'll update to link to your blog, as a self call out.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=11945" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/jonathan_kehayias/archive/tags/SQL+Quiz/default.aspx">SQL Quiz</category></item></channel></rss>