Category: Blog

  • T-SQL Tuesday #155 Round Up

    It’s time to look back at the 155th blog party. I was the host this month, asking about Dynamic SQL. I got quite a few responses, which I’ve gone through and summarized below. If I’ve missed someone, please ping me.

    The Round Up

    There are some great posts, so if you are interested in any of these areas, click through and read the original post.

    Rob Farley is first, as usual. He’s in Australia, so often he gets to publish close to the start of the day in the world. This month Rob writes about the dangers of dynamic SQL and how you can actually not take values of object names from the user. Instead, use their input to search sys.objects and get the value there.

    Vitaly Bruk writes about how single use plans with EF cause issues, and how to solve them.

    Richard Swinbank talks about how to use dynamic SQL to generate SQL code from metadata. Something I’ve used quite a bit in the past.

    Erik Darling takes time to discuss the datatypes used with dynamic SQL and how you might deal with the requirement for NVARCHAR when building the string.

    Ajay Dwivendi has a method for gathering SQL Server health metrics using dynamic SQL.

    Aaron Bertrand gets a post in, despite being on vacation. He writes about ow you might use dynamic SQL to execute code across all databases.

    Brent Ozar adds comments to Dynamic SQL. He suggest you should as well.

    Oliver Van Steenlandt writes about a couple of cases. Managing different levels of aggregates and for building ETL scripts.

    Raul Gonzalez reminds us of the security issues with dynamic SQL and SQL Injection.

    Reitse Eskins has a lot of schemas and uses dynamic SQL to build GRANT scripts.

    Shane O’Neill shows a few Dynamic SQL tricks to make it easier to debug.

    Gerard Jaryczewski is new to the T-SQL Tuesday party, but skips in with a solution to a nightmare for a SQL developer.

    Josh Smith gives us a three act play that is amusing to read.

    Nigel Foulkes-Nock takes a moment to examine the foreach db procedure.

    Kevin Martin writes about a search procedure you don’t have to write, because it’s generated.

    Ken Fisher notes that if we generate code, we need to generate comments as well.

  • Daily Coping 31 Oct 2022

    Today’s coping tip is to find a new perspective on a problem you face.

    I don’t face many big problems, but I do face lots of small ones on a regular basis. One thing I’m struggling with is how to keep up with some of the changes in our products at work. They are sometimes rev’ing so fast, and a good portion of my work is non-Redgate stuff, so I’m falling behind a bit.

    It’s easy to complain and try to work harder, but those aren’t good solutions. Instead, someone suggested to me that I break down the changes into groups of time, rather than thinking of them as a stream. Don’t try to keep up every week or even every month.

    Instead, look at all the changes in a couple months for one product. Spend a few times in a week reading and practicing. Then take another thing the next week (or two) and repeat. I’ll always be a bit behind, but that’s not a bad perspective to talk. I will try this for a bit.

    I started to add a daily coping tip to the SQL Server Central 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.

  • A Good Cause #SeattleSummitMoments

    This is another memory of the PASS Summit, this one inspired by Argenis Fernandez, who wanted to raise money for Doctors Without Borders. I wrote a bit about the effort that year.

    If you have a memory, share it with #SeattleSummitMoments.

    IMG_0373

    IMG_0383

    Nothing major this year, though I will have a different hat.

  • I Hope Someone Brings Back Game Night

    A few years ago at the Summit, Andy Warren and I set up a Game night. We convinced the organizers to give us a room for a few hours one night. We invited people, charged a small admission that was really a 2 drink minimum to fund the bartender, and we bought a few games. People coming brought a ton of games, and it was a fun, quiet night.

    There is no official Game Night this year, which is slightly disappointed this year, but this year is a reboot of the Summit, so I understand. Plus, I don’t have the energy to run something.

    I’m hoping a few of you in the community pick this up. There are a few community events listed on the Summit site, but I’d like to see more.

    I’m calling on a few of you to set up Game Nights. Pick a night, pick a time, and set up a free EventBrite event to get people to register for tickets. I might expect a 30% drop off, so if you want to get 10 people together to do something, allow 13 tickets.

    For Game Night, all you really need is a few tables where people can gather. I’ve seen people play games in hotels or the WSCC lobby. There are a few game venues around Seattle as well. You can bring some games, or ask others to do so.

    Running an event can be easy. Jenn and Sean McCown do a meetup every year at Top Pot, literally just asking people to show up, share a cup of coffee, and chat.

    If you want to find a few fellow gamers while you’re at the Summit, think about putting together a small event. Email the Summit and get your event listed.