The Best Database Administrators Automate Everything

  • Hi Ryan,

    Consider that the article theme is to encourage the development of a mind set that looks to automate all processes, where applicable. It is not the aim of the article to explicitly identify what those processes are, as these are too varied from one Data Professional role to another i.e. the processes are often context specific.

    How would you suggest that the article could provide what you would consider to be sufficient depth, whilst at the same time not being process/scenario specific?

    Thanks for your comments.

  • dlineberry, thanks for your comments sir.

    It sounds as though you are well versed in the art of automation and I imagine you probably have some great code/advice you could share with us.

  • I'm not sure if I agree with the automate 'everything' fanaticism. Some things just add to your technical debt as you are creating code that needs to be managed and updated. My last job I spent 90% of the time fixing the hundreds of legacy automation scripts dozens of dba's had created over the 20 or so years the systems had been operational (all using there own styles and preferred tools). Every time we patched an instance there were hundreds of scripts that needed testing to make sure they still worked!

    Not saying automation is bad just that you have to be careful to not overdo it and to have a good clean out periodically where you review a scripts usefulness and if any in built sql tools would be better utilised instead of a roll your own solution. For example they had written a log shipping solution (as in built log shipping wasn't very good when they wanted it) so you could easily get rid of that for the in built log shipping.

    Overall I agree that automation is king but due to my experiences I am choosy about what I automate and especially the tools I use.

  • yes. I agree...

    I like this I recently saw on a job description for a mySQL DBA for Facebook:

    "Candidates should have extensive experience in writing efficient automation software and a visceral aversion to doing the same task twice"

  • slim.richard (4/9/2012)


    ....

    Not saying automation is bad just that you have to be careful to not overdo it and to have a good clean out periodically where you review a scripts usefulness and if any in built sql tools would be better utilised instead of a roll your own solution. For example they had written a log shipping solution (as in built log shipping wasn't very good when they wanted it) so you could easily get rid of that for the in built log shipping.

    ....

    Well said, automation is most certainly not "deploy and forget". It's about working more efficiently and maximising your resource (time) as a Data Professional, and a key part of that involves reviewing your existing automated solutions in light of technology developments and changing business requirements.

  • John.Sansom (4/9/2012)


    Hi Ryan,

    Consider that the article theme is to encourage the development of a mind set that looks to automate all processes, where applicable. It is not the aim of the article to explicitly identify what those processes are, as these are too varied from one Data Professional role to another i.e. the processes are often context specific.

    How would you suggest that the article could provide what you would consider to be sufficient depth, whilst at the same time not being process/scenario specific?

    Thanks for your comments.

    I understand. The article left me wondering "are you talking about me, or just system admins that do database backups and whatnot?" After re-reading the article (slowly this time), it appears to be written for DBAs, but I see now these concepts can apply to everyone in the field.

  • Thanks for your feedback Ryan! If something is not clear then I want to know about it and I appreciate you taking the time to explain your thinking.

  • John.Sansom (4/6/2012)


    Wait, do people even still use Python? 😉

    I have recently come back to DBAing and I was about to use Python to automate most of the tasks. From this thread's discussion I'd better take a better look into Powershell. Currently we don't have access to SSIS (long story) and that is why a full blow language/environment may come in handy. Anyway, here is a list of Python tools/packages I gathered for the current required reporting tasks I have to attend. This might come in handy for someone.

    MS-SQL Server connectivity:

    http://code.google.com/p/pymssql/

    http://code.google.com/p/pyodbc/

    Data Warehouse Extract-Transform-Load (ETL):

    http://pygrametl.org/

    Object-Relational Mapping Frameworks:

    http://elixir.ematia.de/trac/wiki

    http://www.sqlalchemy.org/

    http://sqlobject.org/

    Python Language Integrated Query – Expression Trees:

    https://github.com/heynemann/pynq/wiki (Pynq)

    http://www.codebadger.com/blog/post/2009/06/01/Pythone28099s-LINQ-Equivalents-e28093-filter%28%29-map%28%29-and-list-comprehension.aspx (Native Python LINQ equivalents)

    Reporting in Python:

    http://www.geraldoreports.org/docs/index.html

    https://github.com/lightcaster/xlrep

    Python integration with other languages/libraries/architectures:

    http://jpype.sourceforge.net/ (Java)

    http://pythonnet.sourceforge.net/readme.html (.NET)

    http://sourceforge.net/projects/pywin32/?_test=b (Win32 Extensions)

    http://www.scipy.org/Weave (C/C++ inline)

    Excel and CSV File Integration:

    http://stackoverflow.com/questions/4257771/python-writing-to-excel-2007-files-xlsx-files

    http://packages.python.org/Pyvot/tutorial.html

    http://docs.python.org/library/csv.html

    Portable Apps (if you need them):

    http://www.portablepython.com/

    http://pydev.org/ (+ Eclipse Portable http://portableapps.com/node/28647 )

  • Thanks for sharing those resources Pedro! I'm sure they will prove useful to other readers.

  • Good article, but rather obvious (who would have thought - automate 🙂 )

    One sentence that has value to me is: "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.". That is a good point.

  • Indeed obvious and yet so tricky for many to actually do....

    Thanks for your comments!

  • Best careful what you ask for. You cannot automate every single thing and you might lose your job as a result.

  • I feel relaxed and excited my applications has successfully passed a 3 years working tool. It is a fully automated ETL, Data mining and Data warehouse system. It consumes a multiple daily data sources (zipped files at FTP and Json at a RESTful webserver) and process and store for more than 120 columns for the business requirement. All processes are automatic! It is a 30,000 lines VBA codes, 10,000 line TSQL code and working MySQL Server. ADO is the most technology used in the applications with a few uses of bat scripting (ohh... I learnt this from 15 years ago), vbscripting, lotus notes class etc. It is beyond SSIS and SSAS capabilities. A wise man (BS) says 'There are no “cookbook” methods that can replace intelligence, experience, and good taste in design and programming'. Aha that man is very true and I did it for fun.

    Well I told my kid and my mum that I have made a robot. Yes this robot is very productive and diligent compared to human being, but sometime it is clever than me as well. I hate a salesman who keeps preaching me that SSIS and SSAS is the best way and every day he pushes/or executes buttons so many time to get things done and never realizes he is a robot. The good thing is this robot has stopped him preaching me out.

  • bobpak (8/21/2014)


    Best careful what you ask for. You cannot automate every single thing and you might lose your job as a result.

    You're more likely to get promoted into a new role, poached by a more ambitious company or have moved on of your own accord, as you continually look for new ways to stretch yourself and grow.

  • bobpak (8/21/2014)


    Best careful what you ask for. You cannot automate every single thing and you might lose your job as a result.

    Your statement is the reason a lot of companies carry so much technical debt. People think that if they build themselves into a process they can't be replaced, which is completely false. I've been in big companies and I've been in small companies, and no matter how much I have automated, I have never run out of things to do.

    Think of it from a management standpoint. Who would you rather have on your team? The DBA who takes 3 hours to manually refresh a DEV database, or a DBA who automates it so developers can restore their own DEV system? I know my choice.

    Your value to your company is finding innovative ways to better serve your customers.

    John Sansom, I thought this article looked familiar. I agree 100%. Glad they re-posted it.

Viewing 15 posts - 16 through 30 (of 35 total)

You must be logged in to reply to this topic. Login to reply