T-SQL Tuesday #110 – Automate Yourself

Automation. It brings to mind scripts. Lots and lots of scripts. And it should. For many years I’ve been writing about using PowerShell to automate your tasks as a DBA and a data specialist.

Today, though, I’m more focused on automating your responses to events. In the theatre we have a term we use called “sense memory”. I’m sure it’s used in a lot of fields, but that’s where I’ve heard it used most often. It means that we automatically know what it feels like when we’re doing something we’ve done often, and that sense memory will help us know when something isn’t the same. When you do something over and over and over again, you develop that sense memory, so that when things become critical, you just know what to do, because you’ve done it already. It’s why artists practice and practice and practice.

Having a checklist to ensure you don’t miss steps in a lengthy process is important. It helps you avoid missing important steps in the process. In my current client engagement the processes I’m building for them have a fairly lengthy and complicated setup, and without a proper checklist, it would be impossible to implement successfully on a consistent basis.

What’s just as important, and is often omitted, is the “practice” step. When I’m building my solutions for my client, and I add to that checklist, I reset my test environment to the beginning, and go through the setup process step-by-step, following the checklist, to make sure I haven’t missed anything. Doing this both verifies my setup process and checklist, but also develops that sense memory of how the process works, so that when we’re ready to go live, I’m far less likely to miss a step.

The same is true when it comes to disaster recovery. More often we’re hearing about things like ransomware taking down entire data centers. When this happens (not if, but when) you need to be prepared to rebuild your servers. Hopefully you have good, well tested, offsite backups. You need to know where all your installation media are (and that that media is available when recovering.) You need to know exactly what the physical specifications, and the names of all the devices, and ensure that all that is reset to the original values before restoring your databases, so that the recovery goes smoothly and quickly.

And you need to practice. And practice. And practice.

Carnegie Hall as viewed from the Stage

Only by automating your own processes can you be sure you’ll get it right when things are truly broken. You’ll know, because you’ve practiced.