Author: way0utwest

  • Updating dbatools–Fixing the Certificate Failure

    I was trying to update my dbatools install to test something and go this error.

    2024-06-27 13_23_12-C__Users_Steve (Admin)

    I fixed it with a little help.

    The Fix

    The short answer from Chrissy LeMaire is to run this:

    install-module dbatools  -Force –SkipPublisherCheck

    That worked.

    2024-06-27 13_35_36-C__Users_Steve (Admin)

    Why?

    Chrissy explained this, but essentially it’s a certificate approval thing. Certificates work by verifying each other in a chain. One cert checks another, which checks another, etc.

    In this case, Microsoft changed some things and while the dbatools goes through some of these things, the update-module is doing extra checks. Supposedly MS will fix this.

    In any case, if you need an update, you need to bypass things for now.

  • Thinking About Technology

    Technology has dramatically changed the world over time. The advent of cars dramatically changed the US, as people could go places and meet others in a way that was difficult and slow before. The telephone let us communicate with people all over the world at a pace that was previously impossible. Computer technology has furthered this at a truly amazing pace, especially since the adoption of mobile devices by so many people. The flexibility in how we can integrate computer technology into our lives has been incredible.

    However, each technology change brings about plenty of negatives and potential problems as well. I ran across a piece from L. M. Sacasas that has some questions we might ask about any technology, including the software we build. The start of the piece is that most of us don’t think about how our work might be misused, which can lead us to dismiss security risks or moral misuse risks. We often don’t consider the malicious ways people view applications.

    The piece is interesting to read, but it ends with several questions that we might ask ourselves as we build something. I think a lot of these questions might not apply to our work with databases or corporate technology, but some do. I think many of them might apply if we think about the tools we use, especially AI.

    Most things many of us build are re-hashes of something else. We might smooth the flow of work with better UX in an application. We might rewrite code to more efficiently use resources. We might implement features or reports in response to a business request, but we often are lightly evolving our software not changing it. We do, however, build things that others might misuse, either accidentally or maliciously.

    The list of questions is interesting, but I also think we need to consider that others might use your system differently, not just from a UX perspective. Consider how they might exploit your software to achieve other aims. We may not be security experts, but others are experts and there are plenty of tools available to scan code and identify vulnerabilities. Use these tools with the knowledge that just because you wouldn’t use the software in a particular way doesn’t mean others won’t.

    Steve Jones

    Listen to the podcast at Libsyn, Spotify, or iTunes.

    Note, podcasts are only available for a limited time online.

  • THAT Conference 2024 in Wisconsin Dells

    THAT ConferenceI’m headed back to Wisconsin Dells next week for THAT! Conference 2024. This is my second time in Wisconsin and third THAT overall. This time I didn’t submit, but Redgate is sponsoring the event and they asked me to deliver a session. I’ll be talking about Best Practices for Seamless Database Deployments on Tuesday morning, but there are a bunch of other good sessions taking place on Tue-Thur.

    Each time I’ve gone, it’s been an enjoyable experience, learning about various developer and database technologies from others. It’s a fun family atmosphere and I recommend this conference as one to consider if you want to learn about any development topics.

    Last year I learned about Rust and hummus in one talk, about containerized builds, and TDD. I also learned about Mind Over Milkshakes, which inspired that piece.

    If you’re near Madison, this is a short drive. It’s worth checking out THAT and trying the conference if you want a family friendly developer event.

  • Monday Monitor Tips – Adding Redgate Monitor Custom Metrics from SQLMonitorMetrics

    This post talks about adding custom metrics from the sqlmonitormetrics.com site automatically and how this works (and how it doesn’t).

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

    What is SQL Monitor Metrics?

    SQLMonitorMetrics was a site that Redgate built years ago to hold various community submitted metrics that users of Redgate Monitor (formerly SQL Monitor) might care about or be interested in using. Myself, Grant, and a number of other MVPs and SQL Server experts submitted our own metrics in various categories.

    At some point an integration was created to make the install of these metrics easy. This post shows how to do this and not to do this below.

    How to Auto Install Metrics

    The proper way to install metrics is to start in Redgate Monitor. Go to the config screen by clicking the gear in the upper right.

    2024-07-02 14_37_58-Global Dashboard — Mozilla Firefox

    Next, in the Alerts section pick the custom metrics and alerts item. Click this.

    2024-07-02 14_38_43-Configuration — Mozilla Firefox

    This brings up a list of your custom metrics. In the text at the top, it says you can install a metric automatically, but you need to click the link my cursor is highlighted on below.

    2024-07-02 14_39_14-Custom metrics and alerts — Mozilla Firefox

    This brings me to the sqlmonitormetrics site. I’ll click find a metric. I could also click the Custom Metrics at the top.

    2024-07-02 14_40_42-Redgate Monitor Metrics - Custom metrics to use in Redgate Monitor — Mozilla Fir

    I’ll select the first one for this post, but you can filter, search, or scroll around to find one.

    2024-07-02 14_40_51-Custom Metric Archives - Redgate Monitor Metrics — Mozilla Firefox

    The page for the custom metric has a button at the top. Please read the page and test the SQL to see what’s returned before you click this, but when you’re ready, click the button.

    2024-07-02 14_42_59-Detecting Connection Timeouts - Redgate Monitor Metrics — Mozilla Firefox

    When I do this, I’m returned to Redgate Monitor, this time on the Create Custom Metric page, with the fields filled in. As with anything, be sure you review and check to be sure this is what you want.

    2024-07-02 14_43_49-Custom metrics — Mozilla Firefox

    That’s it. When you’re done, click create and your metric and/or alert will be set up.

    How Not to Install Metrics

    This works, but it’s a pain. If I go directly to https://sqlmonitormetrics.red-gate.com/ and then find a metric, such as the number of active backups and restores, I see this, an inactive button:

    2024-07-02 14_45_56-Number of active backups and restores - Redgate Monitor Metrics

    Because I didn’t start from Redgate Monitor, I can’t get this automatically.

    If I scroll down, I see all the fields (in bold) and the entries. I can copy/paste all of these into the form, but this is a slow way to add metrics.

    2024-07-02 14_46_45-Number of active backups and restores - Redgate Monitor Metrics

    Don’t do this. Go to Redgate Monitor and start there (as shown above).

    Summary

    This post shows how to automatically add custom metrics written by others from the sqlmonitormetrics website. This is a good way to add common checks to your system that others use.

    If you see something missing, submit it, or ping me and I’ll write it or find someone else to do so.

    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.