T-SQL Tuesday #054 – Interviews and Hiring

Invitation and summary from Boris Hristov.

T-SQL Tuesday #053 – Why So Serious

Invitation from Matt Velic.

Dirty Little Tricks

The Joker

The Joker

Your mission, should you chose to accept it, is to come up with a piece of T-SQL that could mess with your coworkers. And if you’re committed to the fun, implement it!

Need some ideas? Maybe you could…

  • Write a lengthy script that returns a funny or annoying message
  • Implement hilarious login triggers
  • Use Resource Govenor to limit your victims developers

Honestly the sky is the limit. Just be sure to blog about the results of your trickery if you do pull it off.

Special Warning

Folks, don’t get yourself fired. This is meant to be fun. But you know your work environment better than I do. If your job has a stick up its rear-end, just write your tricks down and keep them up your sleeve for when you’re working at a more relaxed place.

And I shouldn’t have to say it, but don’t do this sh!t in Production.

T-SQL Tuesday #052 – Argue Against a Popular Opinion

Invitation and roundup from Michael J. Swart (check out his drawing this month.

Your writing assignment for March 2014 is to

pick a popular opinion and argue against it.

… or at least qualify it. Given any issue, people drift to two kinds of crowds. There’s the “it depends” crowd and there’s the “never ever” crowd. We tend to fall in with one crowd or the other.  This month, I want you to find an “never ever” issue and argue for it (or conversely, find a “always” issue and argue against it).

I wonder how this month will go. It takes guts to go against common wisdom.

You don’t necessarily have to argue against a universal opinion, but it should at least be popular. I think that your choice of opinions is practically limitless:

  • Bob Duffy had a list of 10 interview questions that annoy SQL professionals. With some great topics there including GUIDs, Cursors, and heaps.
  • Google results for “SQL.Server should.never”
  • Fair’s fair. Here are the results for “SQL.Server should.always”
  • Does anyone want to have a shot at redeeming Microsoft Access?
  • Foreign Keys, SchmoreignKeys.
  • Check it out. SQL Server supports varbinary(max)! Ideal for json documents and xml documents (or both!)
  • Shrinking databases and/or log files (because of the fragmentation! God save us all from fragmentation!)

Here’s a little secret. This month’s topic is not for you. It’s for the readers. It’s a chance for you to give them a more nuanced understanding of a topic that they may not have given a lot of thought up until now. I’m a little curious myself.

T-SQL Tuesday #051 – Place Your Bets

Invitation and roundup from Jason Brimhall.

All bets on the table please.  This is the last call for bets, no new bets will be allowed.

This marks the 51st invitation for TSQL Tuesday.  This also marks what should have been the month of the first SQL Saturday event in Las Vegas.  But the house lost on that event so it was pushed out to April 5th.

With that loss and the subsequent push, it is time for you to put on your Poker Face.  This month TSQL Tuesday is taking on a Vegas theme.  I want to know about the gambles within your databases or not within your databases that you have seen over the years.

When has somebody (a CTO, Developer, Business User) placed a bet that was far too risky in your opinion?  What kinds of gambles have been parlayed into catastrophes that could have been easily avoided?  Once you are all in on these dogs and the aggregate limit has been reached, I want to know the handicap and how you fixed it.

Here are some examples.

  1. I encountered a Sharepoint database server that had a 940 GB error log.  The log was locked by antivirus software and couldn’t be cycled.  Upon getting that resolved, I found the log was growing at about 500 MB an hour.  There was a problem with Sharepoint talking to Active Directory.
  2. A developer wrote a cursor that ran for 36 hours.  Upon investigation, the cursor was re-written into a set-based script that ran in 42 seconds.
  3. A 3rd party hosting service stopped SQL Server Services and deleted the system databases.  The line on this bet was that they would have less than 15 minutes of outage and minimal revenue loss.  The reality in this case was a sucker bet.  They lost 4hrs of uptime and nearly 2 million dollars for the client.

I will leave it to you to offer up tokes and/or to discuss any trends this may have revealed to you while producing the rundown.  Have fun with it and remember, with databases a big bet is not necessarily worth the risk.

T-SQL Tuesday #050 – Automation

Invitation from Hemanth D.

Automation plays a huge part in our lives and the DBA profession is no so different. A couple of years ago this topic was shared by Pat Wright. I would like to revisit this again and see how much of our approach has changed.

You could write about, what options you would consider when automating something? Where do you draw the line? What are our preferred tools for automation? T-SQL, PowerShell, VBScript or Batch files(?) or maybe just share something that you automated in the last couple of years.

T-SQL Tuesday #048 – Cloud Atlas

Invitation and roundup from Jorge Segarra.

Cloud. It’s the juggernaut buzzword in IT for the last couple of years now. By now you’ve surely been exposed to some aspect of it: Azure Virtual Machines, Windows Azure SQL Databases, Amazon EC2, Rackspace, etc. At this point in the game the cloud solutions are fairly mature and constantly evolving to better serve their customer base.

This month’s topic is all about the cloud. What’s your take on it? Have you used it? If so, let’s hear your experiences. Haven’t used it? Let’s hear why or why not? Do you like/dislike recent changes made to cloud services? It’s clear skies for writing! So let’s hear it folks, where do you stand with the cloud?

T-SQL Tuesday #047 – Your Best SQL Saturday SWAG

Invitation from Kendal Van Dyke. No roundup.

 

T-SQL Tuesday #045 – Follow the Yellow Brick Road

Invitation and summary from Mickey Stuewe.

An audit trail is needed for various reasons. Some companies need it for compliance, others need it to find out who “accidently” did something stupid last week, and some specialized audit trails can tell you how the data has changed over time.

So, it is time to follow Dorothy and Toto down the yellow brick road and to share your experience with auditing data. If you are new to the T-SQL Tuesday blog party and need some ideas, here are a few:

  • How to implement SQL Server Audit which was introduced in SQL 2008.
  • Your favorite audit pattern.
  • Your worst experience with an implementation of a bad auditing pattern.

T-SQL Tuesday #044 – Second Chance

Invitation and roundup from Bradley Balls.

As a DBA or a Presenter/Speaker we have all had at least one moment we would like back.  The demo didn’t work, you were green and got asked a question you now know in your sleep.  You had a presentation in front of a client, and it all went sideways.  Maybe you logged onto the prod server thinking it was dev and dropped something you shouldn’t have.  These moments serve not just as painful reminders, but also as powerful instruments for learning.  Would you like another shot at getting it right?  WELL NOW’S YOUR CHANCE!   Or I guess actually your…. Second…. Chance.  Your missions should you choose to accept it, tell me one of the moments you had, and most importantly what you learned from it!

First and foremost the rules.

Rule 1: Don’t get yourself fired.  If you almost dropped the prod DB last week, truncated an important table, or took down a prod server during critical business hours, and nobody knows it was you & the people you work for read your blog, you should probably avoid writing about it here.  You want to write about events we can look back on and reflect over, not events HR would *love* to know about.

T-SQL Tuesday #043 – Hello, Operator?

Invitation and roundup from Rob Farley.

The topic is Plan Operators. If you ever write T-SQL, you will almost certainly have looked at execution plans (if you haven’t, go look at some now. I mean really – you should be looking at this stuff). As you look at these things, you will almost certainly have had your interest piqued by some, and tried to figure out a bit more about what’s going on.

That’s what I want you to write about! One (or more) plan operators that you looked into. It could be a particular aspect of a plan operator, or you could do a deep dive and tell us everything you know. You could relate a tuning story if you want, or it could be completely academic. Don’t just quote Books Online at me, explain what the operator means to you. You could explore the Compute Scalar operator, or the many-to-many feature of a Merge Join. The Sequence Project, or the Lazy Spool. You’re bound to have researched one of them at some point (if you never have, take the opportunity this week), and have some wisdom to impart. This is a chance to raise the collective understanding about execution plans!