T-SQL Tuesday #110 Automate all the things!

I’ve read a number of T-Sql Tuesday blogs now, and because i’m working on my own blog, why not join this stampede of blogs 😀

This month Garry Bargsley (b/t) asked the question about automation. What do we automate or what is our favorite tool for automation.

In my daily job, i’m usually troubleshooting ETL processes that are driven by SAP Data Services. A really nice ETL tool that has its quirks but all in all does the job quite nicely. But can you automate that proces?

Maybe you can, but i haven’t found it yet. It’s mostly a black box where many smart things happen, a lot of data movement takes place and presto, there’s your data warehouse! But, when it goes wrong, it can go horrribly wrong. Without any error message you can work with the proces dies and it is able to leave open transactions. For the love of locks, stop doing that! But those are the rare edge-case scenarios that won’t happen very often. But because we’re working with those non-repetitive edge cases, automation is almost impossible. We need to check errorlogs, read them and think of plan to attack the issue.

There’s a second part of my job, something i’ve introduced at my employer by just doing it and showing the customer satisfaction. That’s the SQL DBA part. I know that there’s a difference between a developer DBA, tuning DBA and platform DBA, but i’m working on all three levels. Are there things i can automate? O yes! I’ve written a script that will tell me the basics of any server i log into. It’s inspired by many scripts i’ve seen over the years of googling and i’ve given my personal twist to it. Better or worse? It works for me and saves me 10 minutes of clicking and searching.

Since the second part of last year i’ve been looking into the magic realm of PowerShell. I thought that my SQL script was all magic, butterflies, sunrises and rainbows where the unicors would gather for a fun day out. Yeah well, no. There are so many more possibilities, especially with the dbatools and dbachecks. If you search twitter for @cl and @dbawithbeard, you will find two of the geniuses behind this tooling.

So to circle back to the question, my favorite tool because i kind of know how it works is T-Sql, but it will endure fierce and flaming competition from PowerShell. Now all i have to do is find some time to really dig into that!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s