Category: Blog

  • The Book of Redgate: Do the Right Things

    I do believe that Redgate has been very customer focused since it’s inception. I’ve worked with them in some capacity since 2002 and I’ve felt this along the way:

    2026-02_0177

    The next page has this statement:

    We believe that if we do what is right for our customers then we will thrive.

    I think that’s been true when we keep this in mind. The (relatively) few times we’ve started to do things for ourselves rather than thinking about customers, things haven’t worked out as well.

    I think this sentiment is one that guides a lot of my life. Certainly inside Redgate, but also in the rest of my life. If I do what is best for another, or the world, often that works out well. It doesn’t mean I’m as efficient, profitable, less stressed, or anything else as I could be.

    But I’m happier and I thrive.

    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.

  • Get a Range of Sequence Values: #SQLNewBlogger

    I discovered a procedure recently that I wasn’t aware of: sp_sequence_get_range. This post looks at how the proc works.

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

    The Setup

    I have a sequence object, IDCounter, that is an integer with an increment of 2. The next value that is returned is shown here:

    2026-04_0249

    The next value returned will be 99 (increment by 2).

    However, imagine that I know I need 10 new values. I don’t want a loop to get these values. Instead, I want to move the sequence to 10 values ahead.

    These ten values will be 99, 101, 103, 105, 107, 109, 111, 113, 115, 117. The current value should then be 117 if we get 10 rows.

    Let’s use sys.sp_sequence_get_range to do this. I’ll use this code:

    DECLARE @i SQL_VARIANT
    EXEC sys.sp_sequence_get_range @sequence_name = N'dbo.IDCounter', @range_size = 10, @range_first_value = @i OUTPUT
    SELECT @i AS RangeStart

    I need to use a SQL_VARIANT as the output, though I can cast this to anything once I have the value.

    When I run this code, notice the output.

    2026-04_0251

    Now if I check the metadata, I’ll see the current value below as 117.

    2026-04_0252

    There are client side applications that gather a bunch of data and know they need to insert xx rows. This helps them both update the sequence and also reserve these values for themselves. Of course, if the application fails, these values might be lost.

    SQL New Blogger

    A quick post. This took me about 5 minutes to test and about 10 minutes to structure a quick post on something I learned.

    As a follow-up, I’ll use another post to show how this works in an application that reserves these values and then another application performs an insert.

    You could easily do this on your blog and show some knowledge.

  • Monday Monitor Tips: Oracle Custom Metrics

    One of the popular features of Redgate Monitor has been the ability to add custom mertics for various purposes. This has been popular, and along with our curated list at sqlmonitormetrics.com, it’s a feature that’s used by many.

    It has been a SQL Server only function for awhile, but customers have requested other platforms. We’ve added the capability for Oracle and PostgreSQL.

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

    Adding Custom Metrics

    You can see on my custom metric config page that I have a few business metrics added. I recommend these to customers as often a business metric catches an issue before it appears in Perfmon type data. Let’s add a new metric. I’ll click the

    2026-04_0236

    I’ll click the “Add a custom metric on the right side” and will get a new form.

    2026-04_0237

    This form used to be mostly the same, but the “Choose where to collect data from” didn’t have a drop down. It only had the 1. Select instances and the 2. Select databases (to the right). This new drop down is where you pick the platform.

    2026-04_0238

    If I click the drop down, I see three choices: SQL Server, Oracle, and PostgreSQL.

    2026-04_0239

    I can select Oracle and my select database section disappears. This is because an instance and a database are the same thing in Oracle.

    2026-04_0242

    If I select PostgreSQL, I can still select databases.

    2026-04_0240

    The rest of the form works the same way. When I’ve selected Oracle, I get a default query listed that lets me know the structure of my result set. I need to return an integer with the con_id, a metric value that is a scalar and an optional string with details.

    From there things work as they do with other metrics.

    Summary

    This post shows a new capability in Redgate Monitor for Oracle, where you can track your own data, as you see fit, and then let Redgate Monitor alert on changes, graph this over time, and help you better understand your system.

    We are enhancing and adding to Redgate Monitor every week, but there are always more things that many of you want, and custom metrics give you the ability to choose what you want to 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.

  • A New Word: Soufrise

    soufrise – . The maddening thrill of an ambiguous flirtation, which quivers in tension halfway between platonic and romantic – maybe, but no, but maybe – leaving you guessing what’s going on inside their chest, forced to assume that at any given moment their attraction is both alive and dead at the same time.

    I don’t think in terms of romance here, having been married for nearly 28 years, but I do think about this in terms of my career.

    When I’ve been approached about opportunities or jobs, or someone expresses interest (or I do), it feels a little like soufrise. It’s both a real opportunity or they really want to hire me, like a romanace. Or maybe it’s just a conversation that’s exploratory without any real intention of moving forward (platonic).

    This is a hard place to be, where you might want things to go one way or the other, and the other party might feel differently.

    To me, this is where communication matters, though I certainly understand not necessarily wanting to answer the question about whether this is a romantic or platonic relationship.

    From the Dictionary of Obscure Sorrows