Brent Ozar

Behind the Scenes: Open Sourcing sp-Blitz

Yesterday, we announced that we open-sourced a bunch of our SQL Server tools.

I say “yesterday,” but I’m writing this weeks in advance because a lot of thought and planning went into this. Here, I’m going to give you the behind-the-scenes story as a small business guy.

sp-Blitz and friends were successful.

About five years ago, I launched sp_Blitz onstage at the PASS Summit. I wanted to really blow the attendees’ minds by giving them a tool that would make their lives way easier. It worked – that session was voted #2 of the Summit overall.

That script inspired more scripts: sp_BlitzCache, sp_BlitzIndex, sp_BlitzRS, sp_BlitzTrace, and sp_AskBrent. Each script shared a common goal – let’s automate something difficult and make it beginner-friendly.

By all accounts, they were kick-ass successes. Tens of thousands of people per month downloaded the scripts. I got so many personal thank-yous from DBAs, developers, managers, ISV support engineers, and consultants who said these scripts helped them make a better living.

Along the way, we considered open sourcing them.

We’d always accepted community contributions, and the sp_Blitz changelog shows how folks helped us make it better. To make contributions easier, Jeremiah, Kendra, and I tried moving them to Github.

The first problem we ran into was people distributing old versions. They would upload ’em to Github or their web site, and those old versions were gaining SEO and getting downloaded by people who didn’t know better.

The next problem: consultants and software vendors taking our code, commenting out our names, and then distributing our code as their own. That one really made our blood boil, and we’d be damned if we’d make their jobs easier by open-sourcing it. (This happened twice again last month – it blows me away every time it happens.)

This year, three things made me go for it.

Microsoft embraced open source – no, really embraced, not embrace-extend-extinguish. Call me a sucker, but I believe Microsoft is a different company today than it was several years ago. I believe they’re changing towards an attitude of open-by-default, and I think they’re not just looking for token things to open source – they’re getting creative and pushing for more and more things to be opened up. Not cheap stuff, either, but things that take real money to open source. As a Microsoft community member and a Microsoft MVP, I want to follow that example.

DBAs started to embraced code and devops. I talked to our training class students and clients about what open source would look like, and some of them got really excited. For example, one client uses automated builds up in AWS, and they already fetch certain tools from Github. Putting our own stuff in Github means they can stay up to date faster, and even implement fixes faster.

I’m tired of fighting the inevitable jerks – as long as the tools are open T-SQL scripts, jerks are going to copy them, edit out the copyright, and claim the work as their own. Compiled applications have a better shot at this kind of thing, but stuff like T-SQL and PowerShell have a tough time at it. I’d rather spend my time empowering users.

The PASS speaker contract went sidewaysScott Currie explains the craziness. Right now, we can’t even mention VMware, Hyper-V, ZoomIt, Amazon Web Services, MySQL, or almost anything else onstage. I hope for the community’s sake that PASS Board hears the attendees’ voices (rather than just the sponsors), but for now the only way to talk about community tools is to make them open source and downloadable without giving an email address.

There are still drawbacks and risks: it’s going to mean less traffic on, for starters. We’re going to have to build new tools and create new value for the community in order to keep up our inbound marketing efforts.

It also means more work. Yes, open source is harder than keeping your light under a bushel.

The open-source work required wasn’t easy, but it was fun.

Before we could even announce it, we had to:

Now that it’s gone live, if we want this thing to succeed, we have to:

It’s already been fun seeing the forks, watching the traffic, and approving our first pull request. (Thanks, Nick Schonning!)