Author: way0utwest

  • Using Trace Flags

    At SQLServerCentral, we recently published a list of all the trace flags from Konstantin Taranov. It’s a great list, and thanks to Konstantin for compiling it. While I haven’t often used trace flags, there are some that have really helped me at various times when I needed to change SQL Server behavior. If you aren’t sure what trace flags are, Erin Stellato of SQLskills wrote a great post recently. I see trace flags as feature flags. The development team can allow us to experiment, test, and use functionality at our discretion, or ignore it.

    This week, I wanted to ask how many of you are using Trace Flags right now. Do you have any running in code or set for startup on your instances? If you don’t know how to do this, we’ve got a short piece to help you.

    In Erin’s post, she notes that SQLskills only recommends three trace flags (depending on version) for their customers. In general, I think that’s good advice. There is a risk with using flags, and certainly I would be wary of using without substantial testing. I do think Erin’s list is good, and you might consider using those. I also become wary about trace flags that aren’t embedded directly in code. I think these trace flags end up being hidden from anyone troubleshooting issues. After all, how many of you actually go to the Configuration Manager or the Services Applet and look for parameters?

    I expect that most of you don’t run trace flags on your instances. There may be some of you that have never heard or, or used, a trace flag in your career. That’s fine, though I hope you use today to a) let us know, and b) educate yourself to ensure you know how to enable a flag you need one. If nothing else, add one to a test instance, and ensure you have the skills to actually make the change.

    Steve Jones

    The Voice of the DBA Podcast

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

  • SQL Bits in less than a month

    I’m getting excited, and you should as well. Join me at a fantastic conference in the UK this spring. Register today and come to a training day and learn something. I might just see you there, as I’m thinking to take one or two myself.

    I’ll be presenting “Including Your Database in a DevOps CI/CD Process” on Friday. I’ll be looking at how you can deal with the challenges of database code in a software development process.

    There are lots of great sessions, and whether you come for 1 or 2 training days, just the Friday sessions, or on the free Saturday even, this is my favorite SQL Server conference and I’m sure you’ll find it to be an amazing event.

  • Global v Session Trace Flags

    I wrote a short article on enabling and disabling trace flags. You can read it, but I didn’t really discuss the implications of session v global trace flags, which is something I’d like to do here.

    In the article, I set trace flag 3226 for my session. This showed that a second backup wasn’t in the error log. Note the image below doesn’t have a backup message after (above) the trace flag change entry. You’ll have to trust me that I ran the backup, enabled the traceflag, and then re-ran the backup to get this image.

    2017-03-02 11_54_50-Log File Viewer - ._sql2014

    However, if I have a backup job, as I do here, does the trace flag affect this? This is, after all, run by SQL Agent, which would be a different session.

    2017-03-02 12_36_08-Job Step Properties - backup

    It turns out that the session trace flag doesn’t affect this. I ran the backup job and there was a message in the error log.

    2017-03-02 11_56_19-Log File Viewer - ._sql2014

    To suppress this, I’d have to use DBCC TRACEON (3226, –1) or put this in the startup parameters to ensure none of these messages appear.

  • Informing the Internal IT Team

    Somehow across the course of my career, I’ve morphed from a strictly technical guy to a publisher and teacher that also gets to do some technical work. I never expected this, though perhaps I should have. Despite my disdain for writing in formal schooling, I learned early on to always document and log what I did. In fact, a few times my notes and tracking ended up ensuring that we weren’t chastised too harshly for our actions. Perhaps if even kept some people from being fired. I’m not sure, as I think it’s hard to get fired, but having some reasoning and documentation can provide some insurance against the boss getting too upset.

    In my career, I’ve had to send out status items at different times, with various purposes. As with many of you, I’ve often had to document my time and efforts for my manager. I’ve been a part of teams that adopted the stand-up practice of sharing your workload with others. I’ve had to summarize the work of my team for a director or VP above me. Some of those efforts felt valuable, but often it seemed I was going through the motions and wasting valuable time on something that was more of a cover sheet on a TPS report than anything else.

    There was a post on publishing an engineering weekly newsletter that reminded me of the various status reports I’ve built. While I haven’t had a weekly engineering letter, I have been in companies where a weekly or monthly newsletter was sent out. In fact, at one of my first jobs, we got a physical copy of monthly company newsletter delivered to our mail cubbies (anyone remember those?). While people would grumble about the contents or disbelieve them, I also noticed that many of them actually read the newsletter. I think it’s natural for people to want to be informed about the company, even if they are skeptical about the data.

    The idea of publishing a weekly newsletter for your staff makes sense. It’s a good way to keep people on the same page, especially as your organization grows larger than a single team. I wouldn’t expect everyone to read every part of each issue, but that’s OK. They’ll get something out of it. This is also a good way for someone to fill time during a short break, see who’s out of the office, having a birthday, or changed positions. I think it’s also a good reminder for items like on-call or project releases. Even if I don’t have time to read it right away, finding information in a central place can be a hassle, and a quick search of email would let me check the person to call this week after hours.

    Including technical content is always good, and allowing someone to peruse articles or new concepts on their own time, maybe even encouraging more learning subtlely, could improve the quality and morale of your staff. Of course, if you are an open, exciting company that employees enjoy, this works well. If management is oppressive and overbearing, then publishing a newsletter isn’t going to fix your culture. You’ve got other problems to fix first.

    Steve Jones

    The Voice of the DBA Podcast

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