Author: way0utwest

  • Daily Coping 28 Jan 2022

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

    Today’s tip is to try out something new to get out of your comfort zone.

    I like my comfort zone. I’m very slow to try new things in much of my life. I like new places, and I’ll try new foods, but I often retreat into something that’s comfortable for me. I tried to change this when I put together this tip.

    In this case, my change was to do nothing. Or little. Usually, I try to get things done and push through the hours. I go from work to a second job coaching to the gym to fixing things on the weekend. If there are extra chores, I’ll tackle them.

    I typically do this even when I’m a bit run down. In fact, during the second week of the year, I was starting to feel like I’d caught cold. I took some meds, tried to sleep a bit more, but kept to my routine and working through the week. I felt OK, but constantly a bit run down. I didn’t do my best work, nor did I really get as much done as I’d like. I even did an hour bike ride (indoors), but I was slow and not sure I got as much benefit out of that work as I would have during 20 minutes.

    Finally the next Monday I decided to stop fighting and working at 2/3 speed. I took a meeting in bed and then called it a day, sleeping for most of the time.

    The next day I felt almost normal, and decided to take things slow for another day. Working, but not as much as usual and allowing myself the chance to keep healing.

  • Daily Coping 27 Jan 2022

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

    Today’s tip is to plan something fun and invite others.

    It might not seem that way, but I am not that social most of the time. So planning things and bringing along others is usually reserved f0r family.

    My wife and I did this over the holidays, and I’m sharing here because I think it’s a good idea for others to think about.

    Just after Thanksgiving, a friend noted that they couldn’t get their adult son to come home for the holidays from Texas, so they ended up renting an AirBnB in Miami, buying a ticket for the adult, and bringing their current family down to Miami for the holiday weekend. An expensive weekend, but one that brought them together.

    My wife and I decided to do that with our family. Two of our three adult kids have partners, and we don’t see them as often as we’d like. We looked around and decided we could afford to rent a house in Las Vegas and fly the kids and their partners in for a week after Christmas.

    We had a great time, sharing time together, playing games, seeing a few shows, some hiking, but mostly just getting time with our extended family in a way that’s been difficult.

    I don’t know that we’d do it every year, but it was fun to invite others and do it this year.

  • Checking if a database has a master key–#SQLNewBlogger

    Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

    I’ve been working with encryption in SQL Server for a long time, and have delivered quite a few presentations on the topic. Recently I was updating some code and wanted to check if a database had a master key created in it. This post shows how to do that.

    The DMK (Database Master Key) is a construct that lives inside a database and provides the basis for encrypting other keys. It is a symmetric key, but created with the CREATE MASTER KEY DDL.

    Information about this key is stored in a couple of places. First, it appears in sys.symmetric_keys, with the name “##MS_DatabaseMasterKey##”. You hsould see this with the AES_256 algorithm.

    You can also query the sys.databases DMV for the is_master_key_encrypted_by_server c0lumn, if you keep the defaults. If you run this

    ALTER MASTER KEY DROP ENCRYPTION BY SERVICE MASTER KEY

    then the sys.databases DMV will show 0, even though you still have a master key, as shown below.

    2022-01-25 12_08_37-SQLQuery2.sql - ARISTOTLE.EncryptionPrimer (ARISTOTLE_Steve (55))_ - Microsoft S

    SQLNewBlogger

    A quick post. I was updating code to make it cleaner and realized I needed to add a check for the key. In the past, I’ve just ignored the error, but I took the chance here to refactor things and also produce a quick post.

  • Defining DevOps

    DevOps has become somewhat mainstream in that many companies, perhaps most, are talking about it or trying to implement some of the principles behind this software development approach. However, even as I talk with people that practice DevOps, I find the idea of what DevOps actually includes can vary widely among developers, even inside the same company.

    There are lots of definitions, and this one caught my eye recently. It says, among other things, that there should be “increased collaboration among not only developers and operations staff but users.” I like that there is some emphasis on working together, which is often the hardest part of changing how we build software. I find that many customers struggle because they end up adopting the technology tools, but fail to change how they communicate with others. Culture change is hard, and DevOps requires a culture change.

    The article is high level, but it does highlight some of the complexities of DevOps, mainly that lots of stuff is happening at once. Good reporting, tracking, and management are important, and unfortunately, lots of managers don’t want to change their approaches to managing teams, which further complicates the process of building better software faster. Certainly, the need to have developers work with ops people, including supporting production systems, is important, but it never happens without management requiring and supporting this collaboration.

    The drawbacks to DevOps are many. Plenty of teams slap together code, getting the “faster” part but forget the “better” part, which means increasing and higher quality code over time. They embrace new tools, but they sometimes forget to run small experiments and change their approaches across time when they find better ways of building and operating code. Or they refuse to stick with current techniques or software because they crave change. Developers also find that some groups, like security and compliance departments, aren’t ready for the pace of change, which can be frustrating.

    Ultimately, DevOps is better collaboration, getting all teams on board working together. Like many people rowing a boat, every group needs to align their work with others to ensure a smooth and successful journey. Actually creating that alignment requires strong leadership and culture, two of the hardest, and rarest, things to build inside many organizations.

    Steve Jones

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