Tag: Redgate

  • Monday Monitor Tips–Finding CUs for My Instance

    How can I quickly get a CU patch for a system that’s out of date? I’ll discuss that situation.

    You might think you get to patch every instance every few months, and you may be able to. But most of us have laggards in any decent-sized estate. Someone always wants to avoid patching, or skip patching on the day you’ve scheduled every other system.

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

    Tracking Versions

    The Estate page in Redgate Monitor contains quite a few different views of your entire estate. This section is designed to aggregate data across all the systems you are monitoring. If I look at https://monitor.red-gate.com/Estate/Versions, I see this as a default.

    2024-08_0041

    This gives me an overview of what SQL Server versions I’m monitoring. As you can see, our test estate has a mix of versions, from 2008R2 through 2022 and one Managed Instance. The counts are in the pie chart, and we can see how many are up to date in the bars to the right of each version. As you can see, lots of our estate needs patching.

    I can also see at a glance for each version that the latest update is and its release date. The download link is a quick way to download the latest patch from Microsoft. We maintain this list and Redgate Monitor will update it on a regular basis.

    When I scroll down, I see the details of individual instances. These are grouped, though I can change that with the toggle in the upper left. For each instance, I have the name and the major version,

    2024-08_0042

    The current status and the latest patch are listed next to each other, with an icon and color coding that let’s me know I need to upgrade (yellow up arrow) or I’m patched (green checkmark). I once again have the latest patch, linked to the MS article as well as text that let’s me know how out of date I am.  You can see these patches are a month old. Auditors are potentially OK with that.

    2024-08_0043

    However, for my 2012 instances, I’m way out of date. No excuse for that. We keep these firewalled and protected, and they are available here only for demonstration purposes.

    2024-08_0045

    To the right of this we have our support dates. If a date is past, we mark it with a triangle to let you know that you have unsupported versions. That may or may not be an issue for your organization.

    2024-08_0044

    Summary

    This section of the Estate tab isn’t something I expect DBAs or sysadmins to check often, but I would schedule a reminder to do this quarterly. Knowing the state of our patching process is important, especially when there are security updates being released. We have had a few in the last year for SQL Server, and it is important to patch and apply those.

    Seeing not only the status, but having an easy download link makes this a very handy tab that I wish I’d have had in quite a few jobs during the 90s and early 2000s. If you haven’t checked your estate tab in Redgate Monitor, you might do that today.

    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.

  • Redgate Clone Graduating Images

    I wanted my own custom image in our internal Redgate Clone cluster, so I decided to make one. This is an overview of how this works.

    This is a series of posts on Redgate Clone, which is a way of quickly and easily creating ephemeral developer images of databases.

    Overview

    Usually a custom image comes from production, which is masked and subsetted, then available for devs. However, if you are working in greenfield development or want to experiment, you want to start somewhere. I decided to start with an empty instance and customize it.

    The process I followed is this:

    • create a blank container  (create)
    • make changes to the container
    • save the changes (save)
    • create an image from the container (graduate)

    I’ve added the RGClone commands in parenthesis after each of these steps.

    Creating a New Container

    We have an internal Redgate Clone cluster that many of our developers and teams use for spinning up database environments. I connected to this and created a data container using this command.

    rgclone create data-container –image empty-sql-current

    This is a blank image we have that contains SQL Server 2019 on it (current was a poor choice for naming) and no databases installed. As you can see below, this created the container and then returned the endpoint in a connection string, including credentials.

    2024- 08_ 0032

    When I then listed out the containers running, I could see mine below. It’s the last one, where the container name is the image with a random set of characters appended.

    2024- 08_ 0033

    Once this was done, I decided to connect to this instance and then customize things. This container is just a plain SQL Server instance, and appears like that on the network, so I connected to it in SSMS.

    Customizing things

    Once I connected, I could see this was a standard SQL Server instance, just as if I’d installed SQL Server on a VM.

    2024- 08_ 0038

    I had a script to create a database, so I ran that and created a new database and added some data. When I was satisfied with my changes, I decided to save this as a new image.

    Graduating the Image

    I don’t know why graduate was chosen as the verb, but it was. This means we’ll take an existing container and use it as the source for a brand new image. To do this, we follow a two step process: we save the container state and then create a new image.

    The first step is saving, and we use the save verb with the container who’s state we are saving. This creates a revision of this particular moment in time of what the container looks like. I didn’t include a version, since I was learning. The default is rev.x, where x is the next numeric version.

    Here’s the command and output.

    rgclone save data-container empty-sql-current-wyzpthav

    2024- 08_ 0034

    Now that I have a saved state, let’s use that to create a new image. I used the graduate verb here, but this didn’t work. There is an error that ran off to the side, which noted there was no revision number 1. That’s because the docs didn’t quite explain this, and I wasn’t sure.

    2024- 08_ 0035

    The better command is:

    rgclone graduate data-container empty-sql-curent-wyzpthav –revision rev.1 –name sql-2019-cu22-Northwind

    where we give the contained and the actual revision used (or returned from the save command. In this case, rev.1 is the revision. I also gave this a better name, which reflects the actual version of SQL Server.

    2024- 08_ 0036

    Once this was done, I could see my sql-2019-cu22-Northwind image in the list of data images. I could easily create a new container instance from this, which would be my starting point for more development work.

    Summary

    This is a basic look at how to use Redgate Clone to create custom images based on your work. Ideally, a bunch of this work would be automated, so we could get updated images of the current state of our development systems as we evolve and change our schema and data.

    There are ways to automate things, often starting with a backup, but if you have developers that might want or need to customize a container and want to deploy that to others, this is a way to do that.

    Redgate Clone is a part of our Test Data Manager solution, which includes the ability to also mask and subset your data.

  • Take the 2025 State of Database Landscape Survey

    The survey is out now and you can share your experiences for a chance at $250 in Amazon vouchers. No matter whether you think your org is great or not at managing databases, take the survey. Share some data.

    Last year, we had nearly 4000 responses and all the information is available here: https://www.red-gate.com/solutions/entrypage/state-of-database-landscape-2024/ 

    There were some interesting data points that came out of the survey. A few noticeable ones for me:

    • 43% of respondents support 4 or more database platforms
    • Skills are the top issue with people running multiple database platforms, not surprisingly. Since labor is a big cost, why keep adding platforms?
    • Synching app and database changes is the largest challenge reported by 31% of people. I’m glad it’s this low, but I suspect lots of people responding are proud of their work. People struggling might not fill out the survey.
    • 88% using the cloud, with 18% completely in the cloud
    • Only 20% of people using AI to manage databases. I wonder if this will grow for 2025.

    I’m looking forward to seeing the data from this year and if anything has changed.

    Take the survey today and good luck winning $250.

  • Friday Flyway Tips: Git Integration in Community Edition

    Redgate added Git integration to the free, Community edition of Flyway Desktop. I saw the announcement and decided to make this post to show how this can work for a new project.

    We do need git installed, so head over to the free git download if you don’t have it. From there, install Git and you’re ready to go.

    I’ve been working with 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.

    Source Controlling Your Project

    When you start Flyway Desktop Community, you should see the edition in the upper left, as shown here.

    2024-08_0054

    I’ll click Open project, and choose one of my existing projects. When I do that, I see all the migrations in the project. I can also select or add a target and run flyway commands from here.

    2024-08_0055

    What’s new is the right hand sidebar, which now has the VCS controls. If I click the left arrow in the upper right, I get the sidebar to expand. I can see I don’t have any changes. This bar wasn’t available previously, but now it is.

    2024-08_0057

    Let’s make a change. I’ll close this (click the arrow at the top) and return to the migrations screen. I’ll click the “add migration” button (the arrow points to this in the image below).

    2024-08_0058

    When the editor opens, I’ll add some code. I’ll also change the name. Notice there are no changes in the right sidebar.

    2024-08_0059

    When I save this, all of a sudden, there is a single change in the middle of the bar.

    2024-08_0060

    Expanding the sidebar and clicking on the middle icon, I see my one change has been added as a migration script.

    2024-08_0061

    I can add a comment and commit this or continue working. When I’m done committing, I can easily push my changes from here to the remote.

    I’m manually managing scripts in Community Edition, but I can do it all from Flyway Desktop, including all the version control work.

    Flyway Enterprise

    If you want to get more from Flyway, try Flyway Enterprise out today. If you haven’t worked with Flyway Desktop, download it today.

    If you use the CLI Flyway Community, download Flyway Desktop and get a GUI for your migration scripts as well as version control.

    Video Walkthrough

    No video walkthrough this week as I’m on the road.

    You can check out all the Flyway videos I’ve recorded.