About Half Of You Don’t Have Your Databases Under Control.

I ran a poll over on LinkedIn to find out if people have 100% of their databases under some kind of source control or version control.

I broke the answers up into two sets, developers and non-developers, because I had a hunch that the developers’ answers would be very different than the rest, and indeed they were:

Half (36% + 13% = 49%) of the audience says they have 100% of their database structure & logic under source control – and that’s fantastic for them! I love it. That’s actually better than I expected – however there’s a catch, and I’ll talk about that in a second.

Half (23% + 27% = 50%) says they don’t – and while I’d love for that to be different, I understand that it’s really, really hard. I wish databases like SQL Server just had a “put the source control here” option that would automatically check all changes into a repository, along with who made the change and when, so we had a history. The reality is that today’s databases have no built-in integration with source control, which means you’re gonna have to put in some kind of product and process to make that happen.

Half of the audience is better than none, right? Well, not so fast: remember how I split the audience into developers and non-developers? When I’ve discussed this issue with client teams, the developers have often believed everything was in source control, but the DBAs and sysadmins told a very different story. They’d say, “Uh, well, actually, there have been a lot of changes made to the environment post-deployment, especially by support engineers and vendors, and that stuff hasn’t quite made it back to version control.”

So in reality, even though a high percentage of developers believe they’re doing it right, they’re being let down by other people at the company. Hell, you can even be let down by Microsoft themselves! The ever-funny Sean Alexander pointed out:

Because Azure SQL DB can automatically add and remove indexes in your production database without leaving a bread crumb trail behind to undo its work. Don’t get me wrong, I think that’s a good thing for small to midsize businesses who can’t afford to have a DBA paying attention to every database – but it’s amusing that it works against the goals of source control.

If your databases are 100% in source control, great! I’m so happy for you, and you’re doing it right. You should be really proud of yourself and your team for putting in good practices. It’s now up to you to blog, present, and stream about how other companies can follow in your footsteps. There’s a severe lack of online content around how to do this well with SQL Server and the other Microsoft databases.

If not, take heart: you’re not alone. Even in 2024, lots of your peers are still struggling with the same challenge. To read more about their struggles, check out Mala’s recent roundup of SQL source control blog posts.

Previous Post
[Video] Office Hours: Professional Development Q&A
Next Post
Query Exercise Answers: Solving the 201 Buckets Problem

10 Comments. Leave new

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.