Tag: T-SQL Tuesday

  • T-SQL Tuesday #146–Changing Preconceptions

    tsqltuesdayIt’s the start of a new year, and the first T-SQL Tuesday is from Andy Yun. I’ve known Andy a long time and this is his third time hosting with a creative prompt for us all to consider.

    I really like this one as it could be taken as a technical or a non-technical prompt. What did you think was one way and you learned it was another way. Always good to stop and double check that your view is actually representing what you think.

    We all do this in our views of life as well as work, and it can be hard to change what or how we think. This is especially true for many of my customers, as I find them wanting to adopt DevOps, but not really wanting to change.

    I’ll tackle this one in a couple ways, one technical and one non-technical.

    Separate Accounts for Each Instance

    For a long time, I always used separate domain accounts for each SQL Server service. Even in a large environment, with hundreds of instances, I did the work (or have junior DBAs do it) to ensure that each service was account separated. This was important because I’ve had change passwords and other issues break services in the past. None of the incidents seemed worth saving a bit of time to set up separate accounts.

    Over time, and as SQL Server evolved, Group Managed Service Accounts came into being. I resisted using these at first, but over time I’ve realized that these are valuable and provide security as well as ease of administration. If I went back to managing servers, even single ones, I’d likely look to ensure that gMSA was the standard.

    Take Feedback as An Opportunity

    I’ve struggled with having someone criticize me for my work. I’ve even struggled when they suggest something else, bristling at the idea that I wasn’t doing something well. Often I was successful and doing something well, but there might be a better way.

    Across time, and age, I’ve learned to appreciate other points of view and not become defensive to feedback. Instead, I’ve started to look at other views as a chance to learn or grow, or even just try something. I can still reject the advice or suggestion, but I ought to consider it.

    I’ve started to adopt the “strong opinions, loosely held” philosophy at work.

    Note, I’m trying to do this in my personal life, but I still very much suck at this.

  • The Next Event: T-SQL Tuesday #145

    tsqltuesdayIt’s time for T-SQL Tuesday again, and this month the host is Xavier Morera. He’s been part of the push I had to get a host with every letter of the alphabet. Silly, but fun for me. Now I just need I, O, Q, U, Y, and Z.

    The invite this month is about conferences, and specifically what is your favorite event, venue, presenter, and where you want for your next event. A topic near and dear to my heart as a speaker and organizer, so I’m looking forward to what people write.

    Favorites

    I’ve been blessed to go to many events. My Speaking CV shows most, but I’ve been to quite a few others as an attendee. My favorite conference is SQL Bits. They event is always slightly different, the themed party is fun, and they are family friendly. I see people from all over the world, and I’m excited just thinking about going in 2022.

    My favorite venue is harder. Lots of venues are just spaces, just conference centers. That being said, I think that there are a couple that stand out. Bangalore had a beautiful conference center. SQL Saturday #66 in Colorado Springs was in a games/go-kart center. The elementary school at the Jewish Center in Portland. All memorable locations.

    I think my favorite place I’ve been was the Royal Society of Medicine in London. Redgate rented this out for a few events, and it’s nice, lots of comfortable seats, plenty of bathrooms, tables for lunch. It was quite a nice venue.

    My favorite speaker is tough. I’ve seen many, and I’ve enjoyed most. I’ll give a nod to Amir Netz, from Microsoft, who I’ve seen quite a few times over the years. He’s entertaining, funny, and smart. Half the time I don’t quite understand what he’s talking about, but I’m enjoying it just the same.

    The Next Event

    I’m blessed in that I’m actually just returning from my “next event”. I was in Las Vegas last week for the SQL Server and Azure SQL Conference at DevIntersection.  I’ve been lucky that I was able to attend a few live events this year (2021) and am looking forward to more in 2022.

    Costa Rica would be an amazing next event. I have never been there and would love to go. I’d speak, volunteer, and help organize if someone is interested.

    It’s a tough time in the world, and I know that holding a live event might not be possible, or safe, in some locations. I would love to return to New Zealand, I’m looking forward to Jacksonville in the spring, as I’ve never been able to make that SQL Saturday.

    If I had to choose, I’d want to get a SQL event in Tokyo and go there. I have never been to Japan, and it’s on my list of places to go at some point, so I hope I hear 日本へようこそ one day.

  • T-SQL Tuesday #144–Data Governance

    tsqltuesdayThis month’s topic is something I wouldn’t have considered a decade ago. Especially in the US, this isn’t something that I’d actually have cared about for most of my career. Even when companies talked about governance, it was more a checkbox exercise.

    Dr. Victoria Holt brings us this invitation from the UK, and I think it’s a great one. This is a data topic that will impact more and more of us in the future. Not all of us, but certainly plenty of us.

    If you haven’t thought about this topic, I’d urge you to write something, even if it’s a view that this isn’t necessary. Share your thoughts, this month or in the future.

    Data Governance Effort

    My employer, Redgate Software, has been interested in this for a number of years. We are a UK company, and when the GDPR passed, we knew this would be a concern for us and our customers.

    We built a product to help customers classify and understand their exposure in databases. I hope this expands out to other sources, because I feel this is a constant challenge. While lots of data is in database, we are constantly pulling it out and sharing it in files, reports, and more.

    Security is hard, and I don’t know that we’ll end up completely controlling the access and data, but I do think that we need to understand where our risk and exposure are as we share data.

    This is a hard job, and a boring one. I can’t see many people enjoying the process of dealing with data governance. We need to make this easy to do, in a distributed fashion by many people as they notice something is not being managed. At the same time, I think that we need to be regularly reviewing and examining security against policies. We have far too many public access points being used to share information when things should be secured.

    I don’t know how we reconcile those things, and decide on the value of doing them. Some products may work well, some I think are too targeted, and some too expensive.

    I believe data governance matters, but not sure how we actually get to a place that it’s well done in many organizations. Especially in the US.

    I hope I’m wrong.

  • T-SQL Tuesday #143 – Short Code

    T-SQL-Tuesday-LogoI’m late, but I wanted to get this out. I started the post, then got distracted with travel to Europe late last week.

    In any case, this month the host for T-SQL Tuesday is John McCormack, with his invite to write about short code examples. It’s a good technical invite, and one that immediately got me thinking about things I do often.

    If you haven’t ever tried a T-SQL Tuesday, set up a blog and put out a post on the topic, this week or whenever you read this.

    Snippets

    I work for Redgate Software, though I’d likely be using SQL Prompt no matter what. I was never thrilled with native intellisense, but SQL Prompt has been great. One of the things I like most about Prompt are the snippets, which let me insert code with a few keystrokes.

    Here’s a quick example. If I type “” in SSMS, I see this:

    2021-10-13 10_52_32-CandidateList

    Prompt detects this as a snippet first, then has other matches. I can hit Tab, and I’ll get this:

    2021-10-13 10_52_46-CandidateList

    I get a quick “top 10” from a table. Often I use SELET * for a quick look at the shape of data.

    However, I can add custom snippets, and one I use often is this:

    WITH myTally(n)
    AS
    (SELECT n = ROW_NUMBER() OVER (ORDER BY (SELECT null))
      FROM (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) a(n)
       CROSS JOIN (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) b(n)
    )
    SELECT *
    FROM myTally

    This is my “tt” snippet, so I can type “tt<Tab> and get this code for a tally table. This s handy in many string manipulation and problem solving situations.

    If I need more than 100 rows, I can easily copy the cross join line, add a new alias, and I have 1000 rows with this:

    WITH myTally(n)
    AS
    (SELECT n = ROW_NUMBER() OVER (ORDER BY (SELECT null))
      FROM (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) a(n)
       CROSS JOIN (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) b(n)
       CROSS JOIN (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) c(n)
    )
    SELECT *
    FROM myTally

    Short, but effective code.