Tag: Redgate

  • Friday Flyway Tips: State-based deployment with Flyway

    I was asked about state-based deployments in Flyway, so I decided to show how this can work with a quick demo. This post walks through the process.

    I’ve been working with Flyway and Flyway Desktop for work more and more as we transition from older SSMS plugins to the standalone tool. This series looks at some tips I’ve gotten along the way.

    A Steady State

    I have a Flyway project setup already. I’ve refreshed the screen and as you can see here, there aren’t any differences between my database and my project in version control.

    2025-02_0349

    In SSMS, I’ll create a new table in my FWState_1_Dev database. This is where my project is pointed in Flyway Desktop (FWD).

    2025-02_0350

    I’ve created a new table and it exists. If I  check my QA database, FWSTate_3_QA, I don’t see this object.

    2025-02_0351

    If I refresh my project in Flyway Desktop (FWD), I’ll see my change. I can pick it and see the code, and then I’ll click “Save to project” in the upper right.

    2025-03_0106

    Once the code is saved, I see the confirmation and I have the code ready for commit to a VCS. I won’t do that here, though you should.

    2025-03_0107

    What I want to do now is go to the left bar and select “deploy”, which is the rocket icon.

    2025-03_0108

    When I do this, I see a blank screen, as I don’t have a target. I can select that on the right if I’ve configured one.

    2025-03_0109

    If I pick the drop down, you will see my dev and QA environments. I made changes in the dev environment, and want these changes to go to QA. I can also click the “Manage environments” button. Let’s do that.

    2025-03_0110

    When I do that, I see a list of environments. I use this a lot to double check that I’m deploying to the right place for this project and where to look for changes. If you work across multiple projects as I do, this is handy.

    You can see below I’ve selected QA with the green checkmack in the radio button. Once you pick your environment, you can click “Confirm”. If you need a new target, click Configure.

    2025-03_0111

    I return to the deploy screen, and this time I see the changes that have not been deployed. In this case, that’s one change, but if there were more, I would see them. I can click any object to see the changes, and once I’ve selected what to deploy, I can click deploy.

    2025-03_0113

    When I click Deploy the script is generated and I see a preview. I also can see that this is from my schema model on disk being deployed to the Qa database. That’s handy as this might take a few minutes and who knows what distractions might appear in my life.

    I also can execute this as a transaction or not, and copy the script if I want to examine it in another tool (or format it like SQL Prompt).

    2025-03_0114

    When I click Deploy, I need to confirm my deployment. Always a good step, though I think if you do this often, your muscle memory will be ready to just click confirm.

    2025-03_0115

    Once the deployment runs, we see a message this was successful.

    2025-03_0116

    If I now check the QA database, I see the object.

    2025-03_0117

    Summary

    This post has shown how you can perform manual deployments of changes in a state-based method using Flyway. This is a quick way to move your changes from one machine to another.

    Flyway can do much more, and for smoother automation, check out Flyway Enterprise.

    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.

    Video Walkthrough

    Here is a video of the process below.

  • The Book of Redgate: What’s Great about Redgate?

    “I’m sick of hearing about Red Gate.”

    The first article in the book has this title, which might seem strange, but the short piece then talks about how many Redgaters, as we call ourselves, love working for the company and tell our friends how great a place this is to work.

    The question it asks is why is Redgate great? It’s not the benefits, the gatherings, the fun things, the inside jokes. It’s not even the open, collaborative way or working, the no BS no politics attitude. It’s not anything that’s easy to put into words.

    It’s really the culture, which is hard to describe. It’s like a family, which is similar to what I felt at J. D. Edwards as well. We have good and bad, we have disagreement and arguments, but overall we’re all in this together.

    We’ve grown since then, and it’s a different place, but it’s still a great place to work and one that I hope I stay with until I retire.

    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 London Redgate Summit

    In a week I’m heading to London for the Redgate Summit. I enjoyed these last year and had some very interesting conversations with customers, prospects, and a few Redgate fans.

    This year the event is on Mar 11 at the Tottenham Hotspur Stadium, which should be fun given that I’ve been re-watching Ted Lasso (I still need to make a pilgrimage to Richmond…).

    The schedule has a variety of tracks for leadership and tech people. There are even some breakfast sessions if you want to learn more about Oracle or PostgreSQL. I’ve got the keynote session and a panel for leadership on my agenda.

    Check out the video from last year, and register to come this year. I’ll see you in London next week.

  • Monday Monitor Tips: VLF Alerts

    A recent change made to Redgate Monitor to add a new alert for VLF count. This post looks at the change.

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

    Tracking Virtual Log Files

    Virtual Log Files (VLF) are sections inside of your physical log file (.ldf). These have no fixed size or number per file, but there can be many. The architecture of the log is explained in this doc and it varies according to a number of factors.

    That doc also explains there are issues with too many VLFs inside of a log file. There are plenty of other posts about this (Brent Ozar, Kimberly Trip) and it is somethin you want to keep track of.

    Redgate Monitor changes and grows every week with new releases and one of the resent releases (14.0.41) included a new alert for VLFs.

    2025-02_0318

    To configure this, select the gear icon in the upper right of Redgate Monitor.

    2025-02_0319

    On the configuration page, select the Alert settings. This will bring you to the details for your alerts.

    2025-02_0320

    There are a number of items on the Alert Settings page, but scroll down to the bottom of the SQL Server Alerts section. The Virtual log file count is the last alert.

    2025-02_0321

    The default setting is to raise multiple alerts here. The settings are:

    • low: 100
    • medium: 300
    • high: 1000

    These may or may not be appropriate  for your system, and for me, I don’t know I’ve ever had time to worry about this and I might disable a low level alert and only have two, but you can decide what’s important to you.

    The important thing is that if you worry about VLFs in your environment, you can get alerted and track this over time.

    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.