Category: Blog

  • Monday Monitor Tips: Cloud Migration

    We added costing information awhile back to Monitor for your cloud VM estate. We’ve enhanced this with a cloud migration tab to help you decide how to provision resources in the cloud.

    This is a preview feature, as of Nov 16, so feedback is wanted and encouraged.

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

    Cloud Migration

    There is a “Cloud Costs” section in the Estate menu, which is listed as new for now. That’s the item you want to click on monitor.red-gate.com.

    2026-11_0294

    This brings you to the Cloud Costs tab, but there is a new Cloud Migration tab there (noted as preview) that you want to click.

    2026-11_0295

    This notes that Redgate Monitor is trying to help you move to RDS, so we show the costs there. We’ll add more clouds over time, but from our research and from lots of customer discussions, this is where most people move.

    The screen shows your VMs at the bottom. I’ve split the images so they aren’t so wide and small, but here is a list of our test VMs. Each is listed with the name and grouping platforms.

    2026-11_0296

    To the right of this, we have some recommendations and estimated costs. Ignore the current costs, as this is a demo system and we’re getting some anomalies here. These are already in AWS. We also see if the VMs are ready to migrate or not.

    2026-11_0297

    If I click one of the servers, I get a popup. There are arrows in the upper right to move between systems, but you can see that there are recommendations for RDS and EC2 given.

    2026-11_0298

    The page also shows potential issues that need to be addressed. In this case, a warning about versions.

    2026-11_0299

    Checking another system, here’s the view when the VM is ready to move.

    2026-11_0301

    Below this, there are a list of things that Redgate Monitor hasn’t, or can’t check easily. These are items you need to verify before a cloud migration. We’ll likely get to checking some of these, but this is a good reminder to DBAs of the differences from on-premises VMs to cloud VMs.

    2026-11_0300

    The workload signature tab shows you a number of metrics that are important for a cloud migration, looking back over the last 30 days. This helps you check the recommendation, or compare against the potential systems in Azure or GCP (or elsewhere).

    2026-11_0302

    Summary

    This is a preview feature, but one we’ve spent a lot of time working on in conjunction with customers who are undertaking migrations. They’ve shared what worked, what didn’t, and what recommendations they wish they’d had. We’ve tried to build that into Redgate Monitor and will continue to evolve this feature through our monthly releases.

    If you’re considering a cloud migration, or you’ve been told to undertake one, open the Cloud Costs tab on your Redgate Monitor installation and see what’s recommended. And if you don’t have Redgate Monitor, maybe you want to download an eval.

    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.

  • Advice I Like: Overnight Success

    “Most overnight successes – in fact any significant successes – take at least 5 years. Budget your life accordingly” – from Excellent Advice for Living

    I’ll use a friend as an example, since I’ve had a few people say that they wished they had Brent Ozar’s success. A bunch of people think he found a secret to marketing, picked a nice niche in performance, and started making all this money, taking cruises, buying cars, etc.

    It’s not quite that simple. Over on his personal blog, he has an epic life quest, and if you look at the levels, you’ll see a different story. Look back at Level 1 and Level 2. Those were a long time ago, and those weren’t even that early days. From his first employee, 2012, to having cash for 6 months of expenses (2010) to his first PASS Summit (2008), that’s a 4-5 year stretch. Before that he had a few jobs and spent time trying to be a solo consultant.

    We had a lot of success at SQL Server Central in our first few years, but from founding to a good sale price was about 5.5 years.

    My wife is successful in her horse business, but to feel like it was significant probably took 8-9 years of full time work. Another friend that started a different business plugged away for 12 years before he reached the point he could take vacation without being a) stressed about money and b) calling the office during his time away.

    Success takes work, luck, and effort. It won’t happen overnight. Most of the companies (and people) you read about with huge successes have some time behind them before they make headlines.

    I’ve been posting New Words on Fridays from a book I was reading, however, a friend thought they were a little depressing. They should be as they are obscure sorrows. I like them because they make me think.

    To counter-balance those, I’m adding in thoughts on advice, mostly from Kevin Kelley’s book. You can read all these posts under the advice tag.

  • Should You Use CHOOSE(): #SQLNewBlogger

    I was experimenting with CHOOSE() recently after I was asked a question. In a previous post, I found it can take a (ridiculous) number of arguments. In this post, I’ll look more practically at how this works and where you might use it.

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

    The Setup

    Let’s create a quick table with some data. In this case, I’ll create a table that stores some customer data. I’ll store a customer name and status in this table. There could be other data, but this shows the important parts.

    CREATE TABLE dbo.Customer ( [CustomerID] int, [CustomerName] varchar(200), [CustomerStatus] int )
    
    INSERT INTO dbo.Customer ([CustomerID], [CustomerName], [CustomerStatus])
    VALUES
    ( 1, 'Steve', 1 ),
    ( 2, 'Andy ', 1 ),
    ( 3, 'Brian', 1 ),
    ( 4, 'Allan', 0 ),
    ( 5, 'Devin ', NULL )
    

    This is something I’ll typically see a developer do, where they assume the customer status can be inferred. In this case, we’ll assume that:

    • 0 = inactive
    • 1 = active

    This doesn’t handle NULL, but a lot of people might choose (no pun intended) to make this a 0.

    Querying for Status

    If we want to present something readable, we might do this:

    SELECT CustomerID,
           CustomerName,
           CASE
               WHEN CustomerStatus = 0 THEN
                   'Inactive'
               WHEN CustomerStatus = 1 THEN
                   'Active'
               ELSE
                   'Inactive'
           END AS CustomerStatus
    FROM dbo.Customer;
    
    

    That works, but it’s a bit cumbersome. Since 2012, we’ve had CHOOSE(), which makes this smoother. The new code would be:

    SELECT CustomerID,
           CustomerName,
           CHOOSE(CustomerStatus, 'Inactive', 'Active') AS CustomerStatus
    FROM dbo.Customer;
    
    

    This doesn’t work great, as CHOOSE() is 1-based. This would return (I included the int value):

    2026-10_0136

    A better solution would be to add 1 to the value. This gives me new code:

    2026-10_0137

    Better, but not great. Instead, I’d want to enclose this and handle the NULL.

    2026-10_0138

    That works, but it’s not great. In general, I don’t like this use of coding CHOOSE() as it’s essentially hard coding values.

    Instead, I would lean towards a lookup table with statuses, especially because someone might want to change this later. I’d prefer that a join to a table is better than hard coding these values.

    Where to use CHOOSE()

    To me, the best use of CHOOSE is with boolean or bit values. In this case, we store a 1 or 0, but we can’t easily convert these. The best way to handle this for display, is something like this. Suppose I have a table of answers for users that have bit values. Something like this:

    CREATE TABLE dbo.Answers ( [QuestionID] INT, UserID INT, [Answer] bit)
    
    INSERT INTO dbo.Answers
    (
        QuestionID,
        UserID,
        Answer
    )
    VALUES
    ( 1, 1 , 1 ),
    ( 2, 1 , 1 ),
    ( 1, 2, 1 ),
    ( 2, 2, 0 ),
    ( 1, 3, 0 ),
    ( 1, 3, 0 )
    
    

    If I want to query this, I can use the technique above and get my true/false values.

    2026-10_0139

    There is no chance this will be extended or changed. Booleans only store 2 values. Of course, I might want to wrap this to handle NULLs if those are allowed.

    SQL New Blogger

    This post took me about 15 minutes to setup and write. The code was simple, and the explanation was easy. However, thinking where CHOOSE() would work well and not be a design issue later took me about 10 minutes of thinking and searching a bit on the Internet.

    Lots of people show CHOOSE() in a way that I disagree with, and really booleans only made sense to me.

    This showcases my thoughts, an opinion, and an idea. Show how you can think, especially in the age of AI and impress a potential interview team.

  • Flyway Tips: More Object History

    I wrote about Flyway Desktop Object History in a previous tip. This feature has been enhanced, so I wanted to write an update.

    More History

    The changes now can be looked at from a project level. Note the new history button at the top of the schema mode. This didn’t exist in the previous post.

    2026-11_0222

    If I click this, I get the same view of committed and uncommitted changes, but from a project view. You can see there are two changes in this commit, whose hash is in the far right, a little hidden near the bottom of this image.

    2026-11_0223

    Some commits have a lot of changes, but I can click a change to see the diff. In this case, I can see in the 5th item, the Address table.

    2026-11_0225

    This is great for standups, or a quick look without searching in the repo for commits. Here I see some level of work done, by me and others, which is useful when coordinating a team.

    Summary

    This an improvement of an existing feature, and I like the direction. I’ve asked for the commit to move, so I can easily see it, but otherwise, this is a nice way of seeing how my repo has changed over time. The schema model is especially important here.

    If you work with Flyway, update your desktop and give it a try. We would love to hear your feedback.

    Flyway is an incredible way of deploying changes from one database to another, and now includes both migration-based and state-based deployments. You get the flexibility you need to control database changes in your environment. If you’ve never used it, give it a try today. It works for SQL Server, Oracle, PostgreSQL and nearly 50 other platforms.