Category: Editorial

  • 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.

  • 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.

  • DevOps Isn’t Perfect

    I saw a post recently from Grant Fritchey, Help Me, Help You, Deliver DevOps. In it, Grant shows that DevOps isn’t making developers do everything, it isn’t just giving developers more responsibility, and it isn’t developers handling some of the operational staff responsibilities. It’s about getting development and operations to work together. Hence, DevOps, not DEVops, or Dev    ops.

    In the post, Grant also links to some fundamental failures from companies that supposedly have adopted DevOps processes. Companies like Gitlab and Amazon. There are plenty more examples, which certainly make some people question whether DevOps is better than other methods of building and deploying software.  How are the VSTS issues different from the Knight Capital debacle?

    In some sense, they aren’t. In many cases, we’ve had a software issue that affected customers. People were upset, services weren’t delivered, and it’s entirely possible that revenue was lost. However, one of the things that I think differentiates DevOps is that developers and operational staff can troubleshoot and determine a root cause much quicker. Since the entire commit, build, test, release pipeline is instrumented and documented, your staff can quickly determine what new items might have caused an issue. If it’s not a new item, they can also quickly determine if that’s the case.

    However, once you’ve placed your system in production, DevOps doesn’t ensure that your HA (High Availability) or DR (Disaster Recovery) preparations are adequate. Those are still the responsibility of your Ops staff, but by using DevOps, and storing configuration as code and provisioning your systems in all environments the same, hopefully you’ve taken advantage of this to actually ensure you have tested some HA or DR features in an environment outside of production.

    However, DevOps isn’t prescriptive advice. DevOps isn’t a particular process or a tool that you use or install. DevOps is about learning and improving over time. For different companies, this means you’ll be at a different stage in your DevOps maturity than other companies. Some have complete deployment processes, but limited instrumentation and monitoring in production. Some have tons of data and deploy code perfectly, but no HA. Some have great HA, but poor deployment processes.

    DevOps is about constant improvement and advancement to make your software development (Dev) and deployment (Dev and Ops) and monitoring/management (Ops) better over time. This might not prevent human error, or even code bugs, but DevOps should mean you make fewer mistakes, less often, and learn from them to avoid repeating those issues.

    Steve Jones

    The Voice of the DBA Podcast

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

  • GUI or CLI

    There’s a debate over on Scott Hanselman’s blog about the GUI v CLI in the comments for his Azure CLI post. It’s a blend of people complaining about one or the other, mixed with a few (I think) rational people that recognize the GUI and CLI are both valuable. In fact, there’s one person that mentions SQL Server and the SSMS GUI that can generate scripts for later use.

    I like the command line, but sometimes it’s hard. I don’t remember the syntax for a variety of commands, including various T-SQL ones, because I don’t use them very often. I may find myself depending on Google or BOL for a quick refresher, but often I’ll just use use SSMS if I can to pick some items in the GUI, click Script, and then examine the code before executing it.

    I really don’t mind someone wanting to use the GUI the vast majority of the time they’re working, but someone should be comfortable with a CLI interface. If there is a task that need repeating multiple times, then I really want everyone using the GUI. It doesn’t matter how you’ve written the code, executing something from a CLI is much more reliable than having to click around a GUI, consistently and quickly, over and over.

    I’d like to think that most computer professionals these days are able to use a CLI, even if they aren’t too comfortable. The growth of PoSh as a wrapper around so many features and functions in the MS stack certainly contributes to this, as well as the showcase of much code as code, not as images from a GUI. Github and collaboration, as well as more and more samples of code should mean that many people are comfortable working with code and executing it from some CLI.

    I’m sure there are plenty of exceptions. Someone that works mostly with SQL Server might be happy running code in a query window, but use SSMS for everything else, and maybe not even be aware that they can build things like SQL Agent Jobs from a CLI. I get it, the GUI is quick and easy. I use it for jobs, for Extended Events, and various other tasks where the code is complex and cumbersome. However, if something is easier from a command line, I like using it. Perhaps that’s why my console of choice, ConEmu, is always just a CTRL+~ away.

    Steve Jones