John Sansom SQL Server DBA in the UK

SQL Server DBA Blog, with straightforward advice, quality resources and musings about SQL Server

  • Home
  • About me
  • Books
  • How to Become a SQL Server DBA
  • Popular Posts
  • SQL Server Resources
  • UK SQL Server Events

The Best Database Administrators Automate Everything

Jan 4th, 2011
by John Sansom.

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

  • 10 Character Traits of Outstanding DBA’s
  • Top 10 Junior DBA Interview Tips
  • The Politics of SQL Server Performance
  • DBA Survival Skills – Think Defensively
  • With Great Advice Comes Great Responsibility

← SQLBits 8 Dates Announced
Something for the Weekend – SQL Server Links 07/01/11 →
  • Jody

    Hi John ,

    I totally agree with you , I have been in situations where clients did everything manually and once they have been shown the way ,the DBA’s could actually spend more time implementing proper solution rather then fighting fires.

    Regards
    Jody

    • http://www.johnsansom.com John Sansom

      Hi Jody, thanks for your comments.

      I know exactly where you are coming from. There are shops out there that are suffering from this very scenario right now. What’s ironic is that there is a huge SQL community out there willing to help them, if only they knew about it.

  • Pingback: Tweets that mention The Best Database Administrators Automate Everything | John Sansom - SQL Server DBA in the UK -- Topsy.com

  • http://www.jdgonzalez.net J.D. Gonzalez

    John,

    I couldn’t agree with you more on this. Quite frankly, I don’t quite understand why people don’t automate more. If I have to do something twice I’m going to automate it because it will come back again. I can guarantee it.

    I have to disagree slightly with your response above. I’ve worked in several places where the DBA wouldn’t automate it so that he could appear as a valuable asset to the company. Totally wrong thinking in my opinion. This is also the same person (because of his actions) was too busy to go to training. So now his skills are falling behind.

    Thanks for the article.

    J.D.

    • http://www.johnsansom.com John Sansom

      Like you, I don’t agree with such thinking but I can understand why some do.

      Thanks for your comments!

  • rich

    I’ve been automating as many dba tasks as possible for quite some time.
    A word of warning though… Don’t automate yourself out of a job.
    I say this because I have…

    r

    • http://www.johnsansom.com John Sansom

      I would say that you have opened up your path forward to bigger and better things sir.

  • Pingback: T-SQL Tuesday 14: Techie Resolutions for You not Me | John Sansom - SQL Server DBA in the UK

  • Pingback: Does The Best BI Team Automate Everything? | Balanced Insight Blog

  • Pingback: Something for the Weekend – SQL Server Links 28/01/11 | John Sansom - SQL Server DBA in the UK

  • Pingback: Your Lack of Documentation is Costing You More Than You Think | John Sansom - SQL Server DBA in the UK

  • Pingback: PowerShell: Download List of SQL Server MVPs | Strate SQL

  • Pingback: 10 Things Every DBA Should Do | John Sansom - SQL Server DBA in the UK

  • Pingback: Automation in SQL Server | T-SQL Tuesday #015 #TSQL2sday | sqlmashup

  • http://blogs.softartisans.com Claire

    I just read Noel McKinney’s T-SQL Tuesday post on Automation—he described how a team of Oracle developers he’d been working with wanted to set up this crazy system in C++ instead of using T-SQL, because the latter “wasn’t a serious database system.” Luckily, he convinced them :) manual vs. automation is like walking vs driving, only less pretty.

  • Pingback: Create a List of Links from Google Reader Starred Items with Powershell « SQL Feather and Quill

  • Pingback: How to Get a Head Start on Performance Tuning | John Sansom - SQL Server DBA in the UK

  • Phil Helmer

    In my work, I often have tight time requirements. But I have learned 2 major lessons related to your premise:

    1. Automate/Document as much as possible on every pass. Even if you don’t have the luxury of doing it all at once, revising and improving every time you do the task eventually starts to have its effect. Remember that automating is, in itself, a form of documentation. Our processes are largely based on a library of T-SQL scripts, so the incremental approach is quite accessible for us. YMMV

    2. It’s not just you, but your team members as well. It could be that you’re directly saving other people some time (“here, run this script, look at the output, and try the load again when you’ve corrected the errors.”). Also, especially for you seniors and team leads, do not underestimate how much time can be regained when the devs and juniors only have to come to you for the truly out-of-the-ordinary situations.

    • http://www.johnsansom.com John Sansom

      Great points Phil, with some sound advice too.

      I particularly like your comment “automating is, in itself, a form of documentation”. Of course it is! What a great way to look it and I have to say it’s not an angle that I had immediately considered.

      You’re absolutely right about senior roles too. These folks need to change the way they play the game and have to think about what is is they are doing more strategically in order to be effective. It’s often overlooked, especially by those who are promoted into these positions, that simply doing more of what got them there in the first place is not going to be enough.

      Thanks for your comments!

  • Pingback: SQLBits 8 – That’s a Wrap | John Sansom - SQL Server DBA in the UK

  • Pingback: SQL Server Central

  • Pingback: What Are You Waiting For? | John Sansom - SQL Server DBA in the UK

  • Pingback: DBAs and exetreme productivity « Julian Dontcheff's Database Blog

  • Pingback: 5 Ways To Be A Better DBA Today

  • Pingback: Something for the Weekend – SQL Server Links 15/07/11

  • Pingback: The Lone DBA - Why Automating Processes Is Good | A Wandering Mind | Joshua Feierman

  • Pingback: New Year New Job?

  • Pingback: One (Very Important) Goal For 2012 - AUTOMATE EVERYTHING | A Wandering Mind | Joshua Feierman

  • Andy P

    Thanks for the post John! 

    It’s given me some food for thought.  I’m a bugger for not automating the little tasks that take only seconds to perform, simply because they only take seconds.  But these little guys add up to become a right monster!  So starting from tomorrow I’m going to take a step back for a moment and look at the bigger picture by automating some of the smaller tasks that I have to do.

    One of my challenges is that one of our main production servers is not SQL Server, but a very old Informix database.  Imagine a world where LEN() and TOP() don’t exist with horrific join syntax to boot.  Fully automating things is very difficult because of this (no SQL Agent etc), but as a consequence I have learned many workaround skills.  I’m doing extracts out of our Production server to SQL Server, then using that to generate the SQL which can then be used to update Informix.  Although this means that full automation isn’t possible, I have managed to save a lot of time anyway.  So my tip is to use SQL Server to generate SQL!
    Cheers
    Andy

    • http://www.johnsansom.com/ John Sansom

      Fantastic news Andy! You’re right it can be tough to get started automating some tasks because they seem so short lived in isolation but as you say the cumulative effect can really add up. Be sure to let us know how you get on. 

      I’ve not had the pleasure of working with Informix myself but it sounds like I’m missing out on some serious fun ;-) Thanks for your comments sir!

  • RSS
  • Email
  • Categories

    • Administration (54)
      • Disaster Recovery (7)
      • DMVs (4)
      • Index Optimisation (8)
      • Memory (2)
      • Reporting Services (5)
      • SQL Server Tips (19)
      • Tools (6)
    • Performance Tuning (18)
    • Professional Development (46)
      • Blogging (3)
      • Customer Service (5)
    • Query Optimisation (4)
    • SQL Server Community (134)
      • Reviews (1)
    • SQLServerCentral Syndication (69)
    • SQLServerPedia Syndication (67)
  • Archives

    • February 2012
    • January 2012
    • December 2011
    • November 2011
    • October 2011
    • September 2011
    • August 2011
    • July 2011
    • June 2011
    • May 2011
    • April 2011
    • March 2011
    • February 2011
    • January 2011
    • December 2010
    • November 2010
    • October 2010
    • September 2010
    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009

Copyright John Sansom, 2009-2011, all rights reserved.