Tag: Redgate

  • Monday Monitor Tips: Looking Back in Time

    Often we find out about a problem reported by a customer after the incident has passed. This might be from a trouble ticket or even an email that we didn’t see until a period of time has passed.

    How can we look back at the activity of a server in the past? This post looks how a DBA can time travel back to a situation that occurred in the past.

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

    Time Traveling

    Let’s imagine I get a ticket that said there was a problem at 2:15am from a user running a process. I didn’t get to this at 2am, but at 9:15am when I receive it, I need to look back at what was happening.

    If I pick a server in Redgate Monitor, I’ll see the view below. This is of the staging02 server on monitor.red-gate.com. By default, this shows me the last hour of activity on the server.

    2025-03_0085

    In the upper right corner, I can see the time frame selected on the left (below) and the amount of time. I’ve selected the drop down, and there are many other choices. I also see the metric time at the top, just in case, I’ve started to mess with other values.

    Note: there is a calendar control to the left that can go back to previous days if you don’t want to use the time duration drop down.

    2025-03_0086

    In this case, let’s jump to the last 12 hours. If I select that, you can see my display changes a bit, zoomed out to show 12 hours not 1. The four charts below haven’t changed, however.

    2025-03_0087

    Most of the top chart has a darker background, except for a portion at the far right, which has a white background. This white background part is the focus window, and it determines what the 4 graphs below show, as well as the query information and other data.

    This is set to 1 hour, but I can expand it. If I drag the box on the left side of this further to the left, I can expand the amount of time shown. If you look below, I’ve expanded this to 7:37am as the start.

    2025-03_0088

    I can also slide this. I’ll slide this to the left to cover to 2:00am-3:00am part of the graph. Now I see different views below in the four graphs.

    2025-03_0089

    In this case, I now can focus on the 2:00am issue. I see an annotation that there was a Flyway deployment at 2:00am. You can see the annotation zoomed in with the tooltip when I hover the mouse on this icon.

    2025-03_0090

    I can scroll down to the query area, and I see the top queries, of which there were just a few.

    2025-03_0093

    The top one has a lot of duration, and if I expand it, I can see the query history. Note there was a query plan change just after 2:00, when my deployment occurred. The duration went up and then started to slightly drop. I see another plan change at 2:40am, and if I were to look back at the top, I’d see a second deployment from Flyway at that time.

    2025-03_0095

    I don’t quite know what changed in the deployment, but I’d start looking here to see if this affected my query.

    Summary

    The focus window in the overview for an instance allows you to set the time frame in which you see data related to that instance. This lets you time travel back to look at the server as it existed in the past. The amount of time you can travel back depends on your data retention settings, which we’ll examine in another tip.

    Hopefully this gives you a quick tip on how you can focus your efforts to a relevant period of time when you get an issue to review.

    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.

  • 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.