Category: Editorial

  • How Paranoid Are You About Backups?

    A friend sent me this article from Backblaze on backup strategies. He asked me what I thought, since I do write on DR and backup strategies. I’ve also blogged at times on my personal strategy, which is Backblaze and cloud services. I have a subscription, that I just renewed, to ensure that my two primary desktops are backed up outside of my house.

    The article talks about the 3-2-1 backup strategy and then some more modern evolutions of this. If you don’t know, 3-2-1 means 3 copies of your data on 2 types of media with 1 copy offsite. That’s a strategy I’ve followed for years in enterprise environments. We usually had a local current copy of databases on disk, a second copy on tape, and multiple tapes offsite.

    These days there are some other variations, with 3-2-1-1-0 and 4-3-2. These might include adding air-gaps between items and verifying there aren’t errors in your backups. They also include the idea that for cloud providers, you include multiple regions or countries in case your vendor has issues.

    Being slightly paranoid is a good thing, especially in today’s environment when ransomware is such a huge issue. While some companies might choose to pay a ransom and decrypt data quickly, many start recovery efforts, with the pressure on IT staff to quickly restore backups, and hopefully not bring in another copy of the ransomware that is time activated.

    No matter what strategy you choose, and there are pros and cons to all of these, you need to be sure you can execute on this strategy quickly. I’ve run test restores from Backblaze, just to see if I can get back a random file or folder that was backed up. I’ve also wanted to ensure I understood how this works in the event of a disaster. I’ve been able to bring back a file to a different machine, which is likely the strategy I’d employ in my personal life.

    At work, the same idea applies. You need to test your restores, and with a large staff and constantly changing environment, you should do this more often. The tolerance for delays (RTO) and lost data (RPO) is lower at most organizations, and clients expect recovery to be sooner rather than later. I’ve also seen upper management (directors, VPs), show up and watch technical staff try to recover data. They don’t like to see you fumbling through documentation or googling how to restore certain applications. They do expect you quickly and efficiently get the process moving.

    A disaster is stressful, and they will likely occur at inconvenient times, like when you’re on vacation or in the middle of a big project. Having some knowledge, and some confidence in your skills, will help ensure that you can function under stress. The more confidence you have in yourself, the more others will have in you, so make time to build that confidence on a regular basis.

    Steve Jones

  • Celebrating Lives

    I set up the sqlmemorial.org site earlier this year. It’s not quite complete, with some networking and process to work out, but it’s there, which is the important thing. The site gives us a way to remember  celebrate those that we’ve known as a part of our SQL community.

    There are only a few people that I’ve personally known well, and fewer still that I’ve met. As a result, there are only a few people about whom I can write something about from my own memories.

    I’d like to know more about the others we’ve lost.

    It can be difficult to write a memorial to someone’s life, especially someone that is close to us. It is a sad moment to think that you’ll never get the chance to spend time with a friend again. The few times I’ve had to put words down are upsetting, but they are a bit cathartic.

    The site runs from a GitHub repo, and I have a page on how to add a thought, a note, or a picture. If you have a link, a note, or a picture, please think about adding a pull request to add some depth to the description of someone’s life. Leave a note for them, for others, or for yourself. If you are unsure how to do this, feel free to email me something and I’ll add it in your name, or anonymously.

    I’m saddened when I run across a message or note from someone that’s gone, but I also have some happy memories that I hold on to. If you have any memories, please consider adding something in tribute to sqlmemorial.org.

    Steve Jones

    Listen to the podcast at Libsyn, Stitcher, Spotify, or iTunes.

  • Do as I say, not as I do

    A common saying from parents, teachers, and many managers, is that you should follow their instructions and not necessarily their behavior. This is a very human thing to do, with many of us struggling to follow the behavior that we ourselves want. Instead, we follow the vagaries of our moods and desires. We do this even as we tell others to do things that we don’t bother to do.

    It’s not just human behavior, but it applies to how many companies deal with their customers. Microsoft talks often about taking advantage of new features in code and using the platform to solve problems. They dislike adding simple “syntactic sugar” (like a numbers table), and instead prefer you build the code to handle some of these simple tasks.

    However, they don’t really follow this advice, as Andy Mallon showed with a recent post on why not to use a couple of their “recommended” stored procedures. They’re not well written for modern code, they have limitations (or bugs), and could be considered a security risk.

    To be fair, I know that changing code in something that works is always dicey, but at the very least, moving from varchar() to nvarchar() shouldn’t break anything. If there are edge cases, then write some tests and rebuild the code to work better. Maybe, more importantly, these procedures ought to model good code, as Microsoft would recommend to their customers.

    There are a lot of places where different products at Microsoft might not use SQL Server well, and I understand. These might be software developers that don’t know a lot about how to perform good data modeling or even how to take advantage of SQL Server code. However, at a company with the resources Microsoft has, I’d expect them to form teams to handle these tasks and then review and suggest changes to software like Dynamics, Sharepoint, etc. Even if they can’t use the latest features in the SQL Server codebase, they ought to model good practices for all versions.

    For many of us, we might act similarly inside a company. Often we write code out of habit, and perhaps, to expeditiously get work completed, even when we know better. Using SELECT *, leaving out error handling, and more are habits that far too many of us embrace, far too often.

    Start making some changes today. If you know there are better practices you should follow, then take the few extra moments to implement them. If you don’t know of good practices, start compiling a list, asking questions, even post an idea or question in the discussion for this editorial. We all could write better code, and that starts with us actually making an effort to model the behavior we might preach to others.

    Steve Jones

    Listen to the podcast at Libsyn, Stitcher, Spotify, or iTunes.

  • Interconnected Temp Files

    The other day I went to cook dinner for the family. I had picked a new recipe (everyone loved it), and it was going to be a bit of prep. Before I started, I turned on the speaker in the kitchen, connected my phone, and started Spotify. I got 2 sec into the song, just enough for me to turn and reach for the cutting board when the music stopped. I turned back, started it and everything repeated.

    I tried a few times, but it kept happening. I opened Spotify on the iPad we have in the kitchen, where the recipe was displayed and tried there. I had the same experience. At this point, I was getting annoyed and a little stressed. I needed to get cooking, but I also wanted some music. Maybe a little bit of OCD coming out as I checked my desktop with the same result. I updated the credit card and had my daughter check her app.

    A little searching around had me try different things (rebooting, log out/in, etc.). Finally, I found one person that noted clearing the temp files on my desktop might help. I did that, deleting a few GB and cleaning out the UserData folder for Spotify. I restarted the app, and things worked. I walked back to the kitchen and the iPad, and music played there as well. Finally, I could get dinner started.

    I’ve been enamored with some of the Spotify-connected features, allowing a few of us to listen together. I like when I listen in the car (or desktop) and then move to the other location, I can pick up where I left off. However, I hadn’t expected something like corrupt or data problems on my desktop to affect me on another device. As we start to interconnect more apps, it’s possible that a problem on one device might affect others.

    We do interconnect some systems in the data world. We have clusters and Availability Groups, and we certainly sometimes have instances or databases that create dependencies  between two systems. I doubt that many of you have one instance cause a problem with another, but it’s worth keeping in mind. We want connected systems, but we don’t want failures in one place to cascade throughout all the nodes.

    I like connected things, but I want loose coupling. I want one system to run on its own if the other has an issue, but I do want them to share data or status to improve the operation of the software. The big thing is that I don’t want one device (my desktop) to affect the operation of another (my phone). At least not while I’m cooking.

    Steve Jones

    Listen to the podcast at Libsyn, Stitcher, Spotify, or iTunes.