Category: Blog

  • A Daily Report from Claude

    Redgate had some Claude training recently, which I went through as my knowledge has been gained in bits and pieces and is fragmented. I wasn’t sure I’d get a lot out of it, but I was surprised by a few things I learned.

    One of these was scheduling a task to give me a daily report. This post looks at that process for me. I’ll walk through what happened, and then a summary below of what I think of this.

    This is part of a series of experiments with AI systems.

    Getting Started with Skills

    One of the first demos shown was to build a daily snapshot of what things need to be looked at and handled. The default in Claude is the /morning command. I ran this, looking to customize it, and Claude decided to create a new skill for me, based on this, which it named “morning-plus”.

    2026-08_0267

    I had previously added the Microsoft 365 Connector, so the skill could read my email. That’s good, as this is a read-only view for me, and it’s local to my machine. I’m sure there is some security risk, but this is managed and limited by Redgate, so I’m assuming this is good enough for my work.

    The next thing was to alter the view. I had a weird graph of lines that seemed to try and show the height of a graph implying the length of a meeting or a business of the day, but that’s not helpful. I decided to ask for a calendar list.

    2026-08_0268

    This gave me a nice look at my day, which is shown below:

    2026-08_0269

    Another thing I wanted to do is keep an ongoing TODO list as I have various things that aren’t in my calendar. A bunch of these things are repeating or ongoing, but having a list helps me stay organized. I might need a way to order them, but for now I asked Claude to add this. It guided me to using a folder to store this, which is what I wanted.

    2026-08_0271

    I also decided to keep the report here, as this helps me stay organized. I can keep the todo.md open in VSCode or elsewhere and edit as needed (or ask Claude). I like to do some editing myself, rather than waste tokens. If I have to type in a prompt, but not just edit the doc.

    2026-08_0272

    In the past I’d have tried to figure out how to schedule things. Here I just asked Claude. It did the work for me.

    2026-08_0273

    Once done, I have an item entered in my Scheduled area. This is a Claude thing, so Claude needs to run, which is fine. My desktop is running all the time.

    2026-08_0274

    I clicked the item and selected Run Now from the menu that popped up. This ran and went through all the tasks and produced a report. It took a few minutes, maybe 5? It’s slow, but not a lot of stuff going on when this will run for me, so it’s not a big deal. The report:

    2026-08_0278

    Not bad, but I also want to get anything from overnight that is important. I tend to look at Slack for mentions/links, so I added the Slack connector, which Redgate has authorized. This will let the agent scan for things that mention me and I can get a summary rather than searching through all folders.

    I added a prompt to help here, which is great.

    2026-08_0280

    That didn’t work, and Claude explained why.

    2026-08_0281

    Sad smile

    One note, each time I altered the skill, I had to approve the changes after Claude decided what to do. It’s a good idea, but the list of stuff it lists in a stream of text is too much to read, so I’m not sure how well this secures things.

    I also have to re-approve a changed skill to access my e:xxx folder on each run. I guess it’s good, but in a practical sense, I’m going to just approve this.

    The last thing I added was a Windows Scheduled task to run Edge and load this page. This was easy to do, and it will bring up a browser on my desktop that I can see when I log in. Now I can skip some of the checks I might do early in the am, knowing that I’ll get a view of my day when I get to my desk.

    Summary

    One of the interesting things the trainer noted was that when you start using a new tool, productivity can go down until you get the hang of it. This applies to many tools, but certainly Claude and AI chat/agents. It takes some time to see benefits, which is something I’ve noticed myself. Part of this is learning to use the tool, and part is deciding how you want to use the tool.

    In my case, I was skeptical this was actually a useful thing. My days can be chaotic and crazy. However, I’m willing to give it a try. I am starting to have more and more things that I need to keep an eye on, and things that span more than a day. I use calendar reminders constantly, but there are a lot of moving parts here. Keeping a todo list is a start, though I likely need to add some dates or priorities. I’ll play with this over time.

    The lack of Slack integration is annoying, but if I can keep other things organized, this will be helpful.

    Is this helpful and worth it? I don’t know. This is an experiment on my part, which I’ll run for 3-4 weeks to see if this is helpful in tracking lots of disparate work. I certainly forget some things and then end up working late, or miss deadlines.

    Is this worth the cost? Running a report costs $0.82 in its current iteration. Is it worth $1 to organize my day and prevent missed items? Perhaps. I’m not sure, but this is an experiment.

    2026-08_0279

    A small AI thing, but at $200 a year, this might be a nice productivity helper for me, partially to ensure work is done, and partially to reduce stress from the chaos of my life.

  • A New Word: Gnossienne

    gnossienne– n. the awareness that someone you’ve known for years still has a private and mysterious inner life.

    One of the things I’ve learned throughout my life is that we really don’t know what it’s like for others in their lives. What their relationships are like with family, what really matters to them, what really excites/scares/motivates/repels them. We might have an idea, but I always think of this:

    “Well, we all have a face
    That we hide away forever
    And we take them out
    And show ourselves
    When everyone has gone” – The Stranger, Billy Joel

    When I think of that song, I sometimes think of people I thought I knew, but realized that I didn’t. Social media distorts this more and more, as very few people are willing to share anything that isn’t positive or amazing. Even the challenges people disclose, are minimized or only partially explained.

    This has been especially prevalent with friends and family who have gotten divorced. In some cases, I had no idea someone wasn’t happy in their personal life. In others, I knew there were issues, but had no idea how closely they were to separation.

    Everyone has a face they don’t show to anyone, or at least, anyone but their partner.

    From the Dictionary of Obscure Sorrows

  • Using the SIGN() Function: #SQLNewBlogger

    I was trolling the docs and noticed the SIGN() function. I have never written this in production code, but it is an interesting function. This post looks at where I might use this and when the need arises.

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

    How It Works

    The SIGN() function works by taking an argument and evaluating if the value is positive, negative, or zero. The example in the MSLearn Docs shows the values working in a few ways. I’m reproducing that here to look at how it works.

    2026-08_0196

    If I change this to work with float and strings, we get similar values.

    2026-08_0199

    Essentially, this implements this code:

    IF @value > 0 SELECT @value, 1
        IF @value = 0 SELECT @value, 0
        IF @value < 0 SELECT @value, –1

    Or this code:

        CASE WHEN @value > 0 THEN 1
        WHEN @value = 0 THEN 0
        WHEN @value < 0 THEN -1
        END AS valsign

    This is a simple function, and it’s easily duplicated in code, so why use it?

    Use Cases

    Most of the mathematical algorithms I’ve implemented don’t deal with negative numbers in a material way. Aggregates, such as averages and sums will take the value into account and the sign isn’t important.

    In some cases, it might. Perhaps I want to do some math around distances from zero, but I don’t want the values to cancel each other out. For example, maybe I have a small data set. I have some shipments and weights.

    2026-08_0207

    Now, it makes sense that we’re shipping to and from our warehouse and tracking the direction with a negative quantity for returns. However, to calculate total shipping weight, a sum doesn’t work:

    2026-08_0209

    I really want to normalize the values. I could use SIGN() here, as shown:

    2026-08_0210

    Of course, ABS() works as well, so that’s not necessarily a great example. I’d argue both are slightly obscure without a comment in the code.

    2026-08_0211

    Another example, perhaps I’m looking to determine a trend of movement. I saw this on the Internet from someone else.

    If I run this code, I’m getting the change of values, but also the direction of travel. That TrendDirection lets me know which ways things changed.

    2026-08_0202

    I might want to look for (or alert on) a trend. So, if I look at lines 14-17, I have a trend of increasingly negative values. Perhaps if I have 3 in a row (a complex LAG), I raise an alert.

    Here’s a LAG with SIGN repeated to show that.

    2026-08_0205

    There are other cases I might care about, but these come to mind.

    SQLNewBlogger

    This is an example of a post that shows I know how a function works, but mostly where I might use it. I added my own thoughts, and a couple of use cases.

    This post took about 40 minutes to write, with the code setup and some internet searching involved. I did use Prompt AI to generate some tables and code, which made things easy, but I had to think a bit on the scenarios and how I felt about them.

    All good things to showcase in the age of AI. If an AI generated code, could you determine the use? Knowing SIGN() can help. Write your own post and showcase your knowledge. Disclose if AI helps.

  • Monday Monitor Tips: Configuring Access to the MCP Server

    I have been experimenting with MCP servers in a few ways, including the Redgate Monitor MCP Server. It took me a few tries, and some help from engineers to get connected. I’ll cover how I did this in Claude and Visual Studio Code in this post, and try to warn you about a few places I made mistakes.

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

    Creating A Token

    I’m not going to bore you with the setup and configuration of the Redgate Monitor instance. That procedure might change by release, so I’ll assume you’ve got the MCP server enabled.

    To access the MCP server, you need to give your AI agent a token. This authorizes the MCP server to connect to Redgate Monitor and read data. These are read only tokens, and designed for the MCP and the tools that are available.

    In the configuration, there is an Access Tokens area. Click here.

    2026-08_0225

    Click Create Token on the next screen. This is in the upper right.

    2026-08_0226

    On the next screen, give your token a name, description, and set an expiration date. The default is one year.

    Make sure you select the MCP type. I messed this up the first time.

    Below this, pick the servers the MCP token can access. I’ve selected just the Production serer group, but you can set this as needed. I’d make sure the name and/or description lets you know what can be accessed.

    2026-08_0227

    You will get a review screen, to verify what you’ve done. Accept that and you’ll get a dialog with the token value. Make sure you save this securely somewhere.

    2026-08_0228

    Once you’ve created this, it’s in a list, and you can click the “view details, which shows you what the token can access, as you can see below. You cannot get the token itself anymore.

    2026-08_0229

    Configuring VS Code

    I’m going to show this working in VS Code. I opened the Command Palette and selected the MCP: Open User Configuration, as shown.

    2026-08_0230

    Inside the config, I pasted this inside the “servers” key. This should be a sub element, and this goes alongside any other MCP servers.:

    "redgate-monitor": {
    "type": "http",
    "url": "https://<your-monitor-host>/mcp",
    "headers": {
    "Authorization": "Bearer ${input:redgate-mcp-token}"
    }
    }

    Then inside the “inputs” key, add this:

    {
    "id": "redgate-mcp-token",
    "type": "promptString",
    "description": "Redgate Monitor MCP token",
    "password": true
    }

    The save this. When you start the MCP server, it will ask you for your token. Paste the value in and then you should connect. You do this from the MCP: List Servers item in the command palette. This should give you output like this, with a connection message and tools discovered:

    2026-08_0231

    If I open a chat, and add the MCP as a tool, I can ask questions. Here’s a question I asked and the initial responses from the LLM.

     2026-08_0232

    Once this is done, I’ll get a list of the alerts. I did approve some PoSh commands where the LLM stored results from Redgate monitor and then tried to process those after writing them to a temp file.

    2026-08_0233\

    This is the raw LLM trying to use tools and fumbling around. With a few skills and guidance, this will run smoother, quicker, and more efficiently in your environment.

    Summary

    The Redgate Monitor MCP server is a great way to start using AI to analyze all the data in your database estate that Redgate Monitor collects. There were 7 tools when I started, but within a few weeks there were 11. By the time you read this, there are likely going to be even more.

    Give Redgate Monitor a try and learn how to use MCP servers to link your LLM to Redgate Monitor and start analyzing systems in a more natural manner.

    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.