Category: Editorial

  • Trusting Systems

    What's the cost of this?
    What’s the cost of this?

    Computer technology has become more and more integrated into all sorts of businesses. These days when I look at the ways in which automation and technology is embedded in business, I’m amazed to think that I worked in businesses that didn’t have any personal computer systems early in my life. Unfortunately this integration comes at the a price: dependence. We depend more and more on our systems working as expected for businesses to continue to operate.

    Most businesses can tolerate some issues and failures in their systems for a short period of time. As much as I want to maintain 5 9s of uptime, I’ve never been in a business that really required that level of stability. I’ve had systems go down that management claimed were critical. They’ve been down for a couple days, and the companies didn’t go out of business. We have a lot more tolerance than management would like to admit. If you work with a 24×7 environment like Amazon’s online store or a banking application that is generating revenue every second, that might not be true, but for most of us, in most organizations, for most systems, we can tolerate some downtime.

    However the effects of some failures can’t easily be measured. American Airlines had computer issues recently and had to delay or cancel 400 flights. I’m sure there were some costs in compensating customers that took other airlines, or received vouchers for services. However, most of the flights were moved to later in the day, and I doubt there were many refunds. The short term costs of this computer issue were probably relatively small. Given the fact that some customers might have skipped or moved flights, with a change fee, there might not have been any absolute short term loss.

    However it’s impossible to know how many other businesses were affected. Sales calls that were missed and not rescheduled, people that missed events that were important to them and they’ll never be able to attend, or even penalties paid on contracts for the failure to deliver something in person. What’s also impossible to know is how many people will reconsider booking flights with American in the future because they lost their trust in that company.

    That’s really the bottom line for most of our management and our businesses. If we can’t provide reliable computer systems, management won’t trust us, and their customers won’t trust them. If that happens too often, we won’t be employed, and at some point in the future, we might find ourselves unemployable if our reputation is such that we can’t keep systems running.

    Steve Jones


    The Voice of the DBA Podcasts

    We publish three versions of the podcast each day for you to enjoy.

  • Understanding HA

    51JU2kM8vHL._SL160_PIsitb-sticker-arrow-dp,TopRight,12,-18_SH30_OU01_AA160_I’ve learned a lot about high availability (HA) and disaster recovery (DR) over the last two decades. Some of the things I’ve learned were from studying, some from experimentation and practice, and a few from hard lessons when some part of a system failed. The latter were how I learned the quickest and most effectively, but those were also the most stressful times in my career. Getting called by senior management because a system is down is not the way that I want to improve my skills.

    I know many people struggle with HA and DR, which are two different concepts. They are designed to solve different problems for different situations. SQL Server includes a number of options for how you might handle either HA or DR situations (or both), and the list of options continues to grow over time. We have the AlwaysOn suite of technologies, database mirroring, replication, log shipping, and more.

    All of the technologies that you might use to solve HA and/or DR problems may provide other benefits. The ability scale out, or spread load are a possibility with a few of these features. What I find, however, is that many accidental, junior, or otherwise inexperienced technology professionals that need to manage SQL Servers get confused. They seem to think HA and DR are the same thing, and one technology is somehow better than others.

    Whether you need HR or DR, or some other solution, it’s important the you research, understand, and practice working with the technologies that you will implement. Books Online gives you a good starting point, and there are plenty of online resources where you can ask additional questions or debate the particulars of your situation.

    Disasters rarely occur, but you should take the opportunities to hone your skills at working with the various technologies you may implement before things fail. Schedule failures of systems in your test environment. See if your HA technology keeps the system running if you remove a system, or test that you can recover using your DR techniques. When something actually goes wrong, you’ll be glad you prepared.

    Steve Jones


    The Voice of the DBA Podcasts

    We publish three versions of the podcast each day for you to enjoy.

  • How do you solve T-SQL problems?

    solvetsql

    Six scans, six logical reads. What could be the problem? There’s no problem if you’re always dealing with six rows of data. If you’re dealing with 6mm, however, this is likely to be a performance problem on your server. Many developers might write a query, check the statistics, and see something like that shown above, and think that it’s a good day’s work.

    Solving the problem is only half the job you should do. Solving things in an efficient way is the other half. When you tackle a new T-SQL challenge, what’s your methodology? Do you have one? I don’t need to know, though if you think you have a good one, post a note in the discussion, or perhaps write an article. If you aren’t sure how you begin, other than randomly trying ideas you vaguely understand or have seen others try, perhaps you want to start by reading Kathi Kellenberger’s Step by Step method.

    The image above comes from Kathi’s article, and is indeed the result of her first solution to a complex T-SQL problem. She lists out the basic steps she used to derive the solution, along with the business rules used. All too often I’ve found developers (including myself), start writing code without taking a few minutes to specifically state the business rules. Following that one step might eliminate lots of bugs in coding.

    Her solution worked, but with 6 scans occurring on her 11 rows of data, she knew this would be an issue. Moving forward she asked for help, which is perfectly acceptable way of working in your career. Try to solve it yourself, get a solution working, and then ask if it can be improved. Not only did she end up with a better performing solution, but she learned a bit more along the way. Something we all can do.

    Steve Jones


    The Voice of the DBA Podcasts

    We publish three versions of the podcast each day for you to enjoy.

  • Morphing Microsoft

     

    Microsoft has come a long way, and still has far to go. Which way will they go?
    Microsoft has come a long way, and still has far to go. Which way will they go?

    Microsoft is trying to change from a software vendor to a devices and services company? They are trying, according to this piece from Mary Jo Foley. With a Developer and Platform Evangelism group that is trying to bridge the gap between internal Microsoft developers and those external professionals in the real world, it appears this group will try to provide more code, samples, and frameworks that others can use. Perhaps they will even give us strong architectural examples that stand up to the real world.

    Personally I’d like to see them disclose code that works in real situations. Give us the code behind MSDN or the Microsoft Store. Prove to us you have code that not only works, but it written to meet your standards and needs. If you want to start with something that’s not open to the Internet because of security concerns, how about showing us how one of the internal MS systems really works? Maybe the annual employee review app?

    If the code isn’t enterprise ready, or of the quality that should be used as an example, why not? I know there are the same pressures building systems at Microsoft that many of us face, but if that’s the case, I’d hope Microsoft would tackle some of those issues in their tooling and platforms. They could then show us not only how to do things, but prove it can be done as well.

    I do think there is some truth to the fact that in many of the applications we build, the platform developers use is not just be the OS and local APIs. There is a richness gained by including data from services, data that exists outside of the organization. Whether that’s on the open web or from business partners, we need architectures that help us build applications that can survive some workload burst, tolerate individual machine failures, and do so at a reasonable cost. That doesn’t necessarily mean cloud services to me, but it does me better software patterns, practices, and models for developers.

    Steve Jones


    The Voice of the DBA Podcasts

    We publish three versions of the podcast each day for you to enjoy.