Tag: T-SQL Tuesday

  • T-SQL Tuesday #131–An Analogy

    tsqltuesdayThis month the T-SQL Tuesday invitation is from Rob Volk, the last of the crew that I pushed to host last year at a SQL Saturday. I managed to get four people to agree to host, and all did so. Rob is the fourth this year, and I’m grateful for him and the others for doing this.

    In any case, this month’s invitation asks us to explain what we do. The title is data analogies, which makes sense as most of us participating work with data and so we likely all get asked what we do and we talk about databases. I’ve often said I worked with computers, then I work with databases if someone asks more. Few people want more depth.

    However, while I do work with data, that’s not really the main part of my job. It’s more an adjunct responsibility that I enjoy.

    A Newspaper

    When I started SQLServerCentral with my partners and worked for myself, I had no shortage of people asking me what I did. At Boy Scouts, Volleyball practices, scholarship committees, and more, I was regularly asked what I did for a living. I tried a number of ways to explain the site, but eventually settled on this.

    “I run a newspaper.”

    I really do. I have a daily publishing newsletter that contains information for subscribers. Ads, sometimes funnies or puzzles, and articles they want to read. I have a daily deadline of getting things ready, but fortunately, I don’t have a lot that is time sensitive. It’s hard enough to keep up with a schedule without worrying about article A publishing tomorrow and article B needing to go out the next day.

  • Automation Ideas for T-SQL Tuesday #130

    tsqltuesdayThis month we have another great T-SQL Tuesday topic, and again, a host that I pressured into writing the invitation. Elizabeth Noble (@SQLZelda) and I were talking DevOps last year at a SQL Saturday, just as she was effecting some change at her employer. At an event later in the year, I challenged her to host, and here we are, with a great topic, Automation.

    That’s this month’s invitation. Elizabeth describes the process of using automation to smooth out their deployments to SQL Servers. They slowly built a CICD pipeline and migrated projects over and over to save her time.

    This month, what have we done to automate things? I have a few stories.

    Automating Data Collection

    One of the things that I am passionate about is the SQL Saturday events. I loved that PASS maintained a site, and made a feed of event data available, but over time, we’ve lost some data and I don’t think there is much impetus to maintain this over time.

    As a result, I build an automated process to grab data from the feeds and save it as an XML file on my local machine. I have the basic code up at GitHub, though I need to improve and refactor it a bit. These files change as the organizers update them, so I need a good merge process. Right now I tend to delete all 1-2KB files periodically, as the file is built once the event is approved. However, until all the speakers and sponsors are scheduled the file size is just a few KB. Most events are > 100KB once they are set.

    This is a basic way of grabbing some data, and I’m looking to build a few more data collection processes to grab data in my life and keep it around, just in case some service I use goes kaput.

    Automatic Databases

    I work at Redgate, and one of the things I’ve been spending more time doing is the automation of databases for development with the latest code and test data. This is a challenge, but a few of the things that I’ve done with Redgate that help are as follows:

    1. Use Powershell to automate the creation of SQL Clone images.
    2. Use PowerShell to update SQL Monitor alert values and add instances
    3. Use Flyway in a container to deploy changes
    4. Use our SQL Change Automation cmdlets to deploy changes to databases

    All of these items can be automated so that a user just needs to run a script, or sometimes just click a button.

    I’m slowly getting the PoSh code up on GitHub as I build demos and help customers get things done. Right now, getting organized is the biggest part of my job, because I find these questions coming over and over.

    I’m a bit proponent of DevOps and automation. Use tools and computers to do the tedious, repetitive work. Keep your day focused on solving problems and building/improving scripts.

  • My T-SQL Tuesday #129 Time Capsule

    This month the T-SQL Tuesday invitation comes from tsqltuesdayTamara Clark. I strong-armed Tamara last fall, along with her husband, into hosting this year. She came through, with a great topic given the state of the world.

    She asks us to write about what we’d put in time capsule, the items or information that goes into a #sqlcommunity bucket. In some sense, this invitation reminds me of Brent’s reminder post to himself.

    Memories of 2020

    What do I remember about this year? First, a lot of vacation for me. My employer, Redgate Software, gives a sabbatical every five years. It’s a great perk for employees that stick around, and it has helped me recharge and refresh. I think I was the last one to get a sabbatical this year while the offices were open, however, there are other companies that take care of employees, and my first memory is a reminder of this. Maybe some future person opening this capsule will think about asking their organization for this.

    The second thing is that I won’t go into an office this entire year. I didn’t get any visits before lockdown, and we’ve closed our offices for the year. That’s a first for me in over a decade. However, the next thing I want to remember from this year is that so many companies are realizing that work from home (WFH) not only works, but lots of people are very productive. We can rethink our costs in buildings, commutes, living locations, and more. Redgate has traditionally not allowed anyone to avoid the office. There are a few of us that have been exceptions over the years, but 90% of our employees have been expected to show up at the office every week.

    That’s changed, and it will change our culture and organization in the future.

    The last thing to put in this time capsule is the importance of social contact and togetherness. I’ve missed a lot of this across the five months, to the point I work to see some people locally every couple weeks. I love my family, but I miss the social contact I used to get regularly, whether traveling to a SQL Saturday, visiting an office, maybe working in a library or Starbucks for a few hours, or just at a movie theater.

    We need more social contact, or at least, I do.

  • T-SQL Tuesday #128–Learning From Others

    tsqltuesdayIt’s the second Tuesday of the month and time for T-SQL Tuesday again. This month I’m grateful that Kerry Tyler is hosting. I had the pleasure of sitting with Kerry and his wife at a SQL Saturday last year before the world locked down and presented travel. At the time I was looking for hosts and pressured a few people into agreeing to host a month.

    This month Kerry wrote an interesting invite based on his passion with airplanes and flying. Mistakes and errors with planes can be catastrophic, so they are always revisiting issues and learning from others. He asks us to do the same this month.

    Root Cause Analysis

    One of the things that we talk about in technology is analyzing incidents and failures to determine a root cause. Despite the talk, relatively few places I’ve worked in actually perform a root cause analysis and produce actions that are taken into account in future protocols, processes, and documentation. Too few people perform a blameless postmortem, which is what we need more of.

    And too few companies share their learnings publicly.

    I can’t change that, but I can think forward.

    DevOps

    I talk a lot about DevOps and work with companies to transform what they do. This is part of my job, but it’s also an area I have passion in because I’ve worked in organizations that were following the tenets of DevOps before the term existed. A couple of areas where I learned from others to build better systems for the future.

    Networking is something that relatively few of us deal with as technical professionals. Since DHCP became a very solid platform and the amazing growth of wireless, we don’t need to dig into networking most of the time. However, understanding how DNS works and the networking protocols is still relevant.

    I was fortunate to work with a talented network engineer at one company. We were having issues with a client being able to connect to our database server, and he managed to show us how the DNS records were different between our office and theirs, when working across a VPN. Since then, I’ve always learned to check simple things, with tools like nslookup, to verify a client can see a server.

    As a data professional, I know backups are important. I use BackBlaze at home, but at work I often deal with a variety of products, even with SQL Server. While the backup process has been very consistent and stable in SQL Server, we’ve had different options emerge, as well as third party products that sometimes deal with backups in a different way. I’ve often insisted on verifying that we can restore databases to a point in time, precisely because this is what will be required during some DR incident.

    Over the years, many people have helped me understand how their product or system worked, too many to name, but I’m grateful for those that have helped explain to me exactly how a particular backup or restore process works and helped me validate the process to recover data.

    For the most part, I’ve just been the one pushing to ensure documentation was captured and available for others to use in the future.

    I do try to give back and teach others as well. I’ve been writing about Version Control Systems, including some basics I’ve learned over the years. Sometimes by reading a tutorial or blog, sometimes by making mistakes and trying to work through documentation. My learnings from others inform most of the content I produce to teach you, so it’s not that I’m doing anything innovative; I’m translating the lessons from others and myself for you.

    We all learn from others. We stand on the shoulders of giants and of ordinary people. Remember that, continue to learn, and help others where you can.