SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

The Best Database Administrators Automate Everything

Do you understand the value of your time? I mean really understand it. Time is your absolute number one most valuable asset. Once it’s gone, that’s it, gone forever.

As a Database Administrator (DBA) your skills, services, expertise and ultimately your time will always be in demand. You can only ever deliver on a finite amount of time, that’s just the way it is, so it’s incredibly important that you maximize the use of the time you have available. I guarantee you that this is a philosophy that all Outstanding DBA’s believe.

The Importance Of Automation

SQL Server Blog - The Best Database Administrators Automate Everything

"Is time slipping away from you..."

All too often I see Database Administrator’s operating continuously in what I like to call Fire Fighting Mode. That is to say that they are struggling with their forever growing work load and are consistently operating in a reactive fashion, just  moving from the most important task to the next, without taking stock of the bigger picture. DBA’s that operate in environments like this will often find that the environment is suffering from what is known as Technical Debt, and Coding Horror(Jeff Atwood) discusses the importance of Paying Down Your Technical Debt on his Blog. Let me tell you now that working like this is just not sustainable and either the system or the DBA will eventually break down, more often than not it’s the later that gives way first. Don’t try and be a DBA Hero and throw yourself at the problem harder, you will just burn out quicker. What you need to do is to work smarter not harder.

Understanding the value of your time and acknowledging it’s importance to the success of outstanding DBA’s is the first step towards leveraging it’s power. As a DBA you want to take steps to maximize the amount of time you have available to you, in order to permit you to focus on tasks that add value to your business and to give you that all important capacity to operate in a Proactive Mode. Put simply, you have to make the time for yourself in order to be effective as Database Administrator.

Herein lies the secret of automation and it’s compounding interest that it pays to the DBA.  The more tasks, systems and processes that you can automate, the more time you have available to Proactively reinvest in tasks that add value to your business and to you.

Automate Everything

That’s right, I said everything. Just sit back and take the time to consider this point for a moment. Let it wander around your mind whilst you consider the processes and tasks that you could look to potentially automate. Now eliminate the word potentially from your vocabulary and evaluate how you could automate e-v-e-r-y-t-h-i-n-g that you do.

Even if you believe that there is only a remote possibility that you will need to repeat a given task, just go ahead and automate it anyway! Chances are that when the need to repeat the process comes around again, you will either be under pressure to get it done, or even better have more important Proactive Mode tasks/projects to be getting on with, like furthering your professional development by studying for your MCM Certification and watching the freely available MCM Readiness Videos (and would you believe it, also available in automated fashion using PowerShell :-) courtesy of @anonythemouse ).

At the very least, always create a walk-through of your steps and save your scripts so that you can re-use any work you produce.

The possibilities for how you can go about automating are so vast, ranging from the obvious choices such as SQL Server Integration Services(SSIS) and PowerShell to any Coding/Scripting language of your choice. I have even been known to develop the odd little Java Application (a leftover effect of a former life as a Developer, just don’t tell the Devs) in order to automate administrative tasks. The key thing with automation contrary to typical DBA practices is to not necessarily use the most appropriate tool or technology for the job but to use whatever tool that you can to get the job automated and done.

I’m willing to bet that you have implemented some really creative automated solutions to your tasks and problems. Share your thoughts, tips and ideas on automation in the comments section.

Take Charge of Your Time Now

Automating your tasks will enable you to maximize the availability of your most valuable asset, time, giving you the power to focus your energy and efforts on activities that add value to your business. Start automating EVERYTHING today!

Similar Posts

John Sansom - SQL Server DBA in the UK

John Sansom (Blog | Twitter) is a Microsoft Certified Master (MCM) of SQL Server and publisher of the free SQL community ebook DBA JumpStart, an inspiring collection of advice for Data Professionals, written by 20 SQL Server experts. Awarded the Microsoft Community Contributor(MCC) award, John is a prolific blogger and can be found regularly writing about SQL Server and Professional Development over at www.johnsansom.com.


Posted by Glenn Berry on 4 January 2011

Very relevant post, John. I would bet that many DBAs don't do much automating beyond SQL Server Agent.

Posted by Jason Brimhall on 4 January 2011

Excellent post.  Very relevant indeed.

Posted by John Sansom on 4 January 2011

Thank you both, I appreciate it.

This year I'm looking to really raise my PowerShell game to assist with automation. I think there is a lot of untapped potential in this area.

Posted by Glenn Wilson-326757 on 8 January 2011

Great post, I try to work by this all of the time, and have been know to call my self a lazy DBA to different areas of the business... Do it once so I do not have to do it again, I would rather spend a couple of hours on a task so that the next time it comes around I do not have to.

Posted by C Proctor on 9 January 2011

So weird I have started cleaning up code secondary to automating processes. Sad to see so much "technical debt" in my stuff.

Posted by ian stirk on 10 January 2011


Very nice article.

I have a chapter (The Self-healing database) in my forthcoming book containing several scripts for automating DBA admin tasks.




Posted by John Sansom on 10 January 2011

Glenn, that sounds like a great philosophy to me. The world would be a better place with more lazy DBA's :-)

Thanks for your comments!

Posted by John Sansom on 10 January 2011

Hi cproctor, thank you for your comments.

Acknowledging the fact there "technical debt" even exists is the very first step to being able to do something about it. Sounds like you are on the right track to me.

Posted by Niels Grove-Rasmussen on 13 January 2011

Very relevant post. Great work John.

I think the ground on which you build your automation is metadata. We spend some time collecting and updating metadata - automated ;-)

Posted by matt on 18 January 2011

Perfect topic!

Has always been on my mind and I try to at least fantasize about the automated solution :).  Sometimes its hard to automate when you are under pressure and don't have the time.  When I can spend the time I find something I need and attempt to automate using msdos batch, java, vb, powershell, sql script, SSIS, and anything I can learn quickly.  Unfortunately, finding the time is often a challenge.

Leave a Comment

Please register or log in to leave a comment.