Category: Blog

  • Finding the Next Sequence Value: #SQLNewBlogger

    I saw a question asking about the next sequence value and decided to try and answer it myself. I assumed this would be easy, and it was, but I used some AI help to make it very quick to get the value and learn something.

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

    Checking for Sequences

    I know I’ve done some testing lately with sequences for a customer, so I decided to ask Prompt AI to help. I connected to a database and asked this question after clicking ALT+Z.

    2026-03_0133

    I got this response, which I executed before accepting the code. One thing I like about SQL Prompt is I can execute code and then adjust my prompt (or paste in an error). As you can see, I have 3 sequences in this database. I get a bunch of the meta data, including the current_value.

    2026-03_0134

    However, is that the next value or the last one? It could be interpreted multiple ways. I could look this up, but I decided to ask again. I accepted the code, then wrote a quick SQL statement to get the next value. If you’ve never done this, you might not know how sequences work, which is a different issue. In my case, a “se” tab, “ne” tab “i” got e this code. I then asked to find this.

    2026-03_0136

    UPDATE: From this article, the current_value has an issue. For new sequences, it shows the starting value, even if that value hasn’t been used, so the last_used_value is a better choice.

    SQL Prompt AI returned this query, which gets me the current_value, but I know that. I decided to ask for an explanation rather than Google or work my way through MSLearn.

    2026-03_0137

    The explanation is good. It’s not the current value + 1 it’s the current value + increment, which is a subtlety that some people might miss.

    2026-03_0138

    Let’s test this. I wrote some code and then executed it. I get 17, which makes sense. The current value (seen above) is 15 and the increment is 2.

    2026-03_0139

    Problem solved. This short session likely will help me remember this detail for future code (or prompts).

    SQL New Blogger

    This post took me about 8 minutes to setup the code, capture the images, and write this up. I’ve done a lot of these, but I showed how to investigate a question, use AI for help, and then make sure the AI is actually giving me something good.

    You could write these types of posts and show your fluency with both data engineering and AI assistance. Take a minute and start writing some blogs that showcase how your skills and career are growing.

  • The Book of Redgate: No Politics

    In today’s world, this might mean something different, but in 2010, we had this value:

    2026-02_0176

    In our context, this was about being open and transparent. This is the text from the facing page:

    No gossiping, no intrigue, no pussy-footing around problems and no telling people what you think they want to hear whist privately disagreeing. We will be transparent in our dealings.

    In a small company (2010 must have been 200-ish people), this made a lot of sense and I think overall we minimized politics. I don’t know this will ever be a “no politics” world for Redgate or any other, but we were better about publicly disagreeing.

    I think we’ve lost a little of this over the years, as I see more people talking a bit inconsistently to smaller, private groups than they do to large ones. I try hard not to do this, though I’m sure my open-ness sometimes rubs people the wrong way.

    I’m OK with some conflict. I’m also OK debating and disagreeing about what we do or why/how we do things. I think it’s healthy to do so.

    I have a copy of the Book of Redgate from 2010. This was a book we produced internally about the company after 10 years in existence. At that time, I’d been there for about 3 years, and it was interesting to learn a some things about the company. This series of posts looks back at the Book of Redgate 15 years later.

  • The 2026 Redgate Summit in New York City

    We’re coming back to New York, which is exciting for me. I love NYC.

    The Redgate Summit 2026 – New York City comes back on May 5, 2026. You can register today and I’ll see you back in Manhattan the first week of May. Once again Bob Ward is giving the closing keynote, with me and fellow Redgater’s giving the opening one.

    We’ll have three tracks, but I’ll be hosting a session with one of our customers, so you can hear how and why Redgate Monitor helps them out and what it’s like to work with Redgate. We did this in Chicago, and there were some great questions from the audience.

    We’ve chosen customers who have had good experiences, but feel free to ask them anything about how Redgate Monitor works and how we are as a vendor. I’m certainly proud of how we partner with customers, so come get a first-hand view from a large financial services organization.

    New York City is such an amazing place, and we’ll have a drinks reception after, but there is lots to do. I’ll be bringing my wife and we’ll likely go see a Broadway or comedy show the night before. You should do the same.

    We also have a Redgate track and an AI one, so this is a great chance to see how Redgate views the world and how we’re approaching building software that helps you become more efficient inside your organization.

    Register for the Redgate Summit 2026 – New York City and I’ll see you in May.

  • Monday Monitor Tips: Intelligent Alert Thresholds

    At the recent Redgate Summit in Chicago, I demo’d (lightly) the ML based Alert thresholds in Redgate Monitor and decided to write a little about this.

    Video of this post below.

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

    Noisy Alerts

    When people used to setup Redgate Monitor in the 2015 timeframe (formerly SQL Monitor) they sometimes complained about the noisiness of the alerts. Just too many alerts were sent out.

    I felt this way about other products I’d used in the past, and our dev teams worked hard with support to enhance the produce and tune our defaults to make them less noisy. Many customers appreciate this, though a new install can take a little tuning to customize to what is helpful and actionable vs what is noise for each customer.

    A Better Way

    As the AI-LLM rise started in 2024, we started to work on different ways to use this tech in Monitor. One of our first ideas was an ML based alert that didn’t work on a set level to trigger, but rather would look at historical data and adjust the threshold for alerts. In this way you would

    We released this in v 14.0.37, so you need to be on that version or higher to use this. This is in a documentation page that describes how this work. Basically we take 14 days worth of history (the min required) and run that through a machine learning algorithm to decide what a predicted level should be. There is a pad added, and you can still set a min threshold and a duration.

    If the value exceeds the predicted value + pad, an alert is sent out.

    This is intended to reduce the amount of alerting from a system that might have a variable workload, but one that repeats and is predictable.

    Enabling Alerts

    This is available for the following alerts so far:

    • Processor (CPU) utilization
    • Server waits
    • DTU utilization
    • Query throughput

    If you go into the configuration for any of these alerts, you wil see a “dynamic alert” toggle that can be enabled. You can see this below where is says “Use dynamic alert thresholds”.

    2026-03_0120

    When you do that, you can still set the levels, and as shown below (from the doc page), you get an idea of how the threshold works. The predicted values are shown as the line. If the line gets into the red areas, an alert is raised.

    2026-03_0121

    The time limit works as shown for sensitivity. The value would have to get into the blue area, so you can see a pad around the predicted value alerts are not raised.

    2026-03_0122

    That’s it. Set the alert and if there is 14 days worth of data, each machine gets its own custom alert levels.

    Seeing the Expected Values

    When an alert fires, the alert includes the predicted values as well as the values recorded. You can see below in this alert that CPU was expected to decay, but hadn’t, so an alert is fired where the green line is shown.

    2026-03_0119

    At the top of the alert, you can see that this was generated by an ML process.

    2026-03_0118

    Summary

    This dynamic levels should reduce the amount of alerts you get from variable workloads, since the predictions are made based on each machine’s history. You can set some threshold and sensitivity over time, but the actual values used for alerts are predicted.

    There is also a feedback place in the alert so that you can let us know if this is helpful or not. We use feedback from you to help better tune our the ML works.

    If you have feedback in general, please let us know as we value your opinions and comments on how we shape the future of Redgate Monitor.

    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.

    Video Walk-through

    You can see me check this out in the video below.