Category: Blog

  • Monday Monitor Tips: AI Alert Analysis

    We keep adding new AI capabilities to Redgate Monitor, where it makes sense. Check out this new feature we’ve added for alerts. This is a great addition to help a busy Ops staff cope with a large database estate.

    This is part of a series of posts on Redgate Monitor. Click to see the other posts.

    Alert Index Analysis

    One of the new things we’ve added in Redgate Monitor is an AI analysis of your alerts. This isn’t for every alert. Right now, we have three where this works in preview:

    • Long-running query
    • blocking process
    • Deadlock

    This is documented on its own page.

    You can see this if you go to the Alerts page and look for a blocking process alert. Here’s a URL, but this repeats regularly, so just find the alert. You should see something like this:

    2026-06_0115

    If you click on the alert, then you’ll see the details, as shown here. However, to the right is an “AI Analyze Alert” button.

    2026-06_0116

    If you click that, a blade slides out from the right, and it has some analysis in it. This has a summary at the top. For my session, this had ended, so the summary is nice in that it gives me an overview with the time of the blocking and the statement. There is also a root cause analysis below this. This is something that would help me quickly answer questions from my boss.

    2026-06_0117

    Further down there is a diagnostic review, which helps you navigate Redgate Monitor to verify things. You should use the AI to help you and still verify what it says. This is a good explanation, but worth double checking. There are also recommended actions below this.

    2026-06_0118

    It’s a good way to approach a series of alerts, especially in a busy environment where you might have lots of these alerts across different systems.

    Summary

    AI is a great tool in places, and this is one of those measured approaches from Redgate to use AI where it’s helpful and useful, and does some work for you. Looking across a bunch of similar data and getting patterns, getting some quick insight into timings, that’s useful. This might be especially great when someone calls you with a question and you need a summary.

    As always, you should verify the diagnosis and recommendations before you do something, but this does give you a quick place to start fixing chronic issues in your system. I look forward to AI analysis coming to other alerts.

    Redgate Monitor is a world-class monitoring solution for your database estate. Download a trial today and see how it can help you manage your estate more efficiently.

  • A New Word: La Guadière

    la guadière – n. a glint of goodness you notice in something that you wouldn’t expect, which is often only detectable by sloshing them back and forth in your mind until everything dark and gray and common falls away, leaving something shining at the bottom of the pan – a rare element hidden deep in the bedrock, that must’ve washed there by a storm somewhere upstream.

    It is easy at first glance when something sad, distasteful, or otherwise negative occurs to get upset or see a problem. When you think about it, sometimes you feel like there is something good. That blessing-in-disguise that is revealed after your initial reaction fades and you have a moment to consider the situation.

    I have often felt that I react to something and think about the negative. That seems like a very human reaction. For example, a customer doesn’t want to spend time changing a process, even though it’s broken. I only think about the negative.

    However, if you pause a moment and twist the situation from your view to someone else’s, then la guadiere comes out. A broken process, but a known one, isn’t the worst thing in the short term. It allows other work to get done, people are familiar, and it can be lower stress, even if it requires more effort.

    The same thing if you have an issue. A flat tire, broken internet, a broken horse feeder. There’s some la guadiere in there. A flat might let me know my tires need replacing and they’re dangerous, or maybe I haven’t cleaned up around the garage properly. Internet teaches me to prepare more in advance (or take a break). Broken horse feeders let me catch up on some maintenance and maybe improve something before it gets much worse.

    Find the good in life, even when it’s bad.

    From the Dictionary of Obscure Sorrows

  • UNION vs UNIONALL: #SQLNewBlogger

    While writing another post I realized my UNION query didn’t work as one might initiall expect, so I decided a short post was worth writing. This is based on a previous post on QUOTENME().

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

    Missing a Row

    When I ran this code, I got only a single row. There’s a UNION here, so why? One would expect two rows from these queries.

    2026-05_0287

    Let’s change to UNION ALL. Now we see this:

    2026-05_0288

    You can likely spot the reason, but it’s because both rows in the result are the same. In this cse, UNION is designed to remove duplicates. In the docs, it explicitly says

    • UNION ALL – Includes duplicates
    • UNION Excludes duplicates

    We can see this in this examples I’ve got this code that gives me two virtual tables of numbers, some of which are duplicate:

    WITH myTally(n)
    AS
    (SELECT n 
     FROM (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) a(n)
    )
    , myTally2(n)
    AS
    (SELECT n 
     FROM (VALUES (1), (20), (3), (40), (5), (60), (7), (08), (9), (100)) b(n)
    )
    SELECT n
    FROM myTally
    UNION 
    SELECT n
     FROM myTally2

    When I run the query, with UNION, I see these results, 14 rows:

    2026-05_0289

    If I change to UNION ALL, 20 results.

    2026-05_0290

    Use UNION when you want unique things. UNION ALL if you need to see ALL The Rows.

    SQL New Blogger

    This post was about 8 minutes spent after I finished the other post. It is a quick expansion on something I saw in another post, it has a separate focus, and it shows I’ve realized something and built on previous work.

    You can showcase these skills.

  • Join Me in San Diego to Learn about AI and Software Development

    You might have seen this graphic on the side of my blog. It’s my discount code for VS Live in San Diego this September.

    I got accepted to talk about LLMs on your local machine or data center, which is something I think will be more and more important in the future. Already the EU is less thrilled with US tech giants, and I suspect many other companies will rethink allowing their data to flow to non self-hosted LLMs.

    I’m also talking about the Data API Builder, which makes software development much easier for software engineers, and includes an MCP server. I’m excited to showcase how this has grown over the last few years and think it’s a cool technology.

    Register today, use my code, save your company some money, and join me in Sunny San Diego. The Padres aren’t in town, but we can still enjoy some time in San Diego.