Author: way0utwest

  • Automate Yourself to a Coffee Break

    I’ve worked as a production DBA in a few companies, and in those positions, I’ve always worked to make my position one of “insurance,” with me able to respond when things go wrong. My goal has been to understand, improve, and enable an environment that runs smoothly, which allows me to take leisurely coffee breaks and not hurried (and harried) sips of coffee as I walk from the coffee pot back to my desk.

    There was a good article published recently about the mindset of a DBA and how automation is an important part of your job. If there’s something you can easily automate, then it’s probably something you should automate. There are plenty of tasks that are easy to script into jobs, set alerts for, or have the system perform some action when they occur. If the system is performing that work, then you have time to deal with other, higher value tasks.

    What are those higher value tasks? Well, what things do people complain about, but you never get the time to work on? Perhaps tuning queries? Maybe practicing your skills for a disaster? Finding time to analyze the performance of systems and plan for the future? There’s probably no shortage of things that you wish you had time to deal with because there is no shortage of busy work you’re assigned.

    Do yourself a favor. Look for places to introduce automation through T-SQL scripts, Powershell commandlets, alerts, and more. Practice writing some small program to manage a task for you. It might seem like it will take longer than doing the work, and it will. However the next few times you’re asked to complete the same task, it should take you much, much less time.

    Steve Jones

    The Voice of the DBA Podcast

    Listen to the MP3 Audio ( 1.8MB) podcast or subscribe to the feed at iTunes and LibSyn.

  • The Mentoring Experiment – Closing Thoughts

    Andy wrote a post today called The End of the Mentoring Experiment, which is something we’ve talked about for some time. In fitting with the decision, and perhaps justifying it further, we decided to do this a few months back, but as with many things, we haven’t gotten to it until today.

    I remember when we started this, and we were very excited and interested. The first cycle of matches, using 8 people we hand picked, consumed a lot of time, and while it was successful, it was difficult to scale. We continued on a couple other cycles, trying to tweak to process a bit, but never found a way to manage this effectively, given other parts of our lives, and were never quite comfortable with automating too much of the experiment away.

    We also struggled with the idea of accidently making some mistake, breaking someone’s privacy, or causing harm to another’s career or life. Andy wrote a few things about this, and it made sense to us.

    We do believe in mentoring, and I hope that those of you looking to grow your careers take time to look for mentors. If you need advice or want help, ask. There are lots of people that will probably give you a little time. It’s not a sign of weakness to need or want a mentor. It’s a sign of maturity.

    For those of you with some experience, keep an eye out for someone that might ask for help, or maybe just seem to be lost. Tread lightly, and carefully, but offer to be a sounding board if they’d like one. You can really make a difference in someone’s career with a little effort.

  • Grant for President

    Grant Fritchey is running for the PASS board. He’s not running for President, though I’m not sure why he shouldn’t be able to. The board makes decisions as a group and the President isn’t necessarily more or less powerful than other members. However the President can be the face of PASS and present an image that motivates others. Grant would be great here, and I’d like to see the President elected directly at some point in the future, without the nonsensical requirements they serve for multiple terms before then.

    However that’s a separate discussion. In the next week, the election will take place and I’m voting for Grant. I’ve known him a long time, I’ve watched him work with the community, and I think he might be able to create some change in the organization.

    For far too long, I think PASS has been stuck in a bureaucracy that acts out of fear rather than leadership, and I’d like to see that change. I wouldn’t blame any past or present board members as I think many of them are fine community members, but I think the organization has systemic problems that create issues. I’ll cease ranting about that, and no, I’m not going to attempt change myself. I did once, but I have neither the time nor inclination to fight those battles right now.

    I’m voting for Grant. You can make your own decisions, but I am choosing Grant because he’s can create change. I’ll also vote for JRJ for the same reason. I think James has worked to create, and implement change, and I’d like to see him do more, especially in non-US areas.

    I’m not sure who else I’d vote for, though I like both Wendy and Sri. I’m not sure what they’ve done, and I’d certainly like to get more information. That’s one of my complaints from all board members, is that they disclose too little information to the community.

    However you vote, please take a minute and vote. We have an amazing community, and the more you participate, the better it gets.

    Disclosure: Both Grant and I work for Red Gate Software, so take that for what it means to you. We’re also on the DBA Team together 😉

  • Get Testing with tSQLt

    tSQLt is a testing framework that is designed to help you write repeatable, isolated tests against your database code. In this session we will briefly examine the goals of testing, where it can be used in an automated deployment pipeline, and introduce you to the tSQLt framework. We’ll show you how to design and write tests to enforce standards, check calculations and other DML operations as well as check exception handling. You will see how a real world refactoring task can be tested in a repeatable manner. Learn how you can incrementally write tests that help you build higher quality code and minimize the introduction of errors against your existing objects.

    We will examine a variety of tests, including

    • Checking table metadata
    • Checking function calculation
    • Isolating a procedure test from an embedded function
    • Checking for error handling

    PowerPoint slides:

    Code: GetTestingtSQLt.zip

    Presentations: