Category: Blog

  • SQL Kilts #SeattleSummitMoments

    This is another memory of the PASS Summit, this one an idea from Grant Fritchey, who wanted support the Women in Technology (WIT) events.

    And have a few laughs

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

    Only a few of us did this one year, but many more over time. Here are Grant and I, much younger than now, during that first year.

    1917751_182491245418_1197791_n


  • Daily Coping 1 Nov 2022

    Today’s coping tip is to be kind to yourself. Remember progress takes time.

    I’ve spent most of this year trying to better manage my weight and become healthier. I started the year at around 243 pounds, which for a 6’ person is a lot. I felt quite fat.

    I worked through the first part of the year and managed to get down to 215-218. Then a trip to London had me pop up to 222, but I managed to get below 220 again. Throughout the summer and into Q3, I had a lot of travel. I got as high as 230 (likely a lot of water weight), but struggled to get below 220 again.

    I’ve had a bit more time lately at home, and I’m better at watching my diet. As I’ve struggled between trips, I have learned to be patient, accept the failings of my travel diet, as well as continue to work to be better.

    Hopefully I’ll be below 220 when I head to the Summit in a few weeks.

    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.

  • Paid Flyway Advantages–Undo and Check

    The Community edition of Flyway has some nice basic features, and it works well for many people. However, it requires you to do a lot of the heavy lifting of building and deploying scripts. There are some advantages of the paid editions, and one of those is the Undo and Baseline script additions in Flyway Desktop, which we’ll look at in this post.

    This is part of a series of posts that looks at Flyway and the feature differences between editions.

    Flyway Desktop

    The GUI for Flyway is Flyway Desktop. This works for all editions, though some features are not visible when you aren’t licensed for them. Here is the GUI we see the Flyway Community. Note there really is only one thing, which is a list of migrations.

    2022-10-27 17_39_14-Flyway Desktop

    This is useful, and it’s certainly nicer than Explorer. Plus, I can see what is run on a particular instance if I add one.

    If I look at my Flyway commands, I see this:

    2022-10-27 17_43_04-Flyway Desktop

    This lets me do the basics of what a script runner does. I can follow a simple, happy path with this functionality.

    Teams

    Flyway Teams is the mid-tier, and this adds a few nice things. In this case, I now see objects changed in the schema, and I get version control. Both valuable tools. 2022-10-27 17_41_08-Flyway Desktop

    However, for the Flyway functionality, I also get Undo and Baseline, both things that I do often.

    2022-10-27 17_41_58-Flyway Desktop

    The undo is huge, as there are times I need to get rid of something, or fix a script. Hopefully not in production, but definitely in dev and test.

    I can also dry run and see the script that will get executed here, something I’ve always wanted to do as a DBA.

    Enterprise

    The really useful tier is Enterprise. I know it’s pricey, but it also does the things I really need most in a mixed team of different skill levels.

    I get the Generate capability, which really automates the things from SQL Compare that hundreds of thousands of you have found valuable.

    2022-10-27 17_45_53-Flyway Desktop

    I also get the Check command, which lets me look for potential problems.

    2022-10-27 17_46_09-Flyway Desktop

    They All Work

    All tiers work, but the paid versions save you time and handle more of the work for you. If you have a team of gurus, you might like Community, but if your staff could use some help, think about trying the paid editions.

  • 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.