Category: Blog

  • Index Maintenance Can Change NORECOMPUTE Settings

    I had a customer recently ask about a change in one of their constraints on production, where a new option appeared when they went to deploy some changes from QA. They asked how this could happen, and I’ll show how in this post.

    Suppose I create a table like this in a development environment.

    CREATE TABLE [dbo].[Logger](
         [LogID] [INT] NOT NULL CONSTRAINT LoggerPK PRIMARY KEY,
         [LogDate] [DATETIME] NULL,
         [LogMsg] [VARCHAR](2000) NULL
         )
    GO

    I (hopefully) have a process to get this to production (version control, automation, etc.). Once in production, if I were to script this on SQL Server 2022, I’d get this from SMO.

    CREATE TABLE [dbo].[Logger](
         [LogID] [INT] NOT NULL,
         [LogDate] [DATETIME] NULL,
         [LogMsg] [VARCHAR](2000) NULL,
      CONSTRAINT [LoggerPK] PRIMARY KEY CLUSTERED
    (
         [LogID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY]
    GO

    This looks different, but really this includes the defaults that existed in dev, and also in production. Hopefully all my SETtings and configuration is the same, to ensure no surprises.

    Now, let’s imagine a DBA has some index maintenance, perhaps Ola’s scripts or some other script that works through all tables and indexes. If a DBA decides they’d like to edit the script to change a setting, they might end up running this code for my Logger table:

    ALTER INDEX ALL ON dbo.logger
    REBUILD WITH (FILLFACTOR = 80, SORT_IN_TEMPDB = ON, STATISTICS_NORECOMPUTE = ON);

    There’s a small change in here from the defaults, which I’d see if I were to run a SQL Compare comparison. Now I’d see this type of change, which might not be a problem, but it might be an issue where each deployment wants to reset this setting.

    2025-04_0139

    If you don’t think this is a big deal, here’s the deployment code:

    2025-04_0140

    I would not want this going through my deployments. And it might if our team were no diligent in looking at the deployment script.

    Be explicit with defaults, and be careful about making changes in production. You might end up creating problems in your update process if you don’t feed these changes back to development.

  • Speaking at SQL Saturday Austin 2025

    SQL Saturday Austin 2025 is in just a few days. I am honored to be speaking there, and glad to be going back. I’ve missed a number of the Austin events with schedule conflicts, but things worked out well this year, and I’ll be at the event.

    The schedule is out and it’s packed with some great sessions. I’ll be talking about zero downtime deployments, but there are some other nice ones:

    • MS Fabric and SQL from Bob Ward
    • AI for the data professional from Ginger Grant
    • SQL DBs in Fabric for Dashboards and Marts from Joey D’Antoni
    • Defending against Ransomware from Jeff Iannucci

    and plenty more. I’m sad to miss Conor Cunningham’s talk, but we’re at the same time.

    There’s also a Pre-con on Friday about Fabric if you want to attend. It’s a great chance to get very reasonable training at a low cost.

    If you’re anywhere near Austin, some out this Saturday and join us for a great day of learning.

    Now I’m off to pack as I leave tomorrow to head to the Redgate office in Austin for the rest of the week before the big event.

  • Updating SSMS is Easy (w/ v21)

    I’ve been using the SSMS preview for v21. This is the next evolution of SSMS, where the VS shell is finally being updated. For many of us, SSMS has been using an old version of the Visual Studio shell as its basis for development. It’s a locked down version, which is limited what’s possible in SSMS. Redgate and a few other companies have hacked in tools like SQL Prompt and SQL Source Control, but the number of extensions.

    In any case, this post looks at the upgrade to preview 6. I was on 4 on this machine, and I noticed a message when (returned home and ) started SSMS.

    2025-04_0095

    Just like v19 and v20, this appears in the lower right corner. However, in this case, it’s showing a VS 2022 update.

    When I click the update on close, and close SSMS, I see a UAC dialog and then the VS Installer. The download and install starts right away, in the same way that any VS update comes down.

    2025-04_0130

    When this finishes, no download, nothing for me to do, I see things updated.

    2025-04_0133

    And I’m updated. When I started, I got the question about testing the new connection dialog, which I agreed to, but forgot to screenshot. In any case, I can now do more testing with this new version to be sure it’s working well.

    2025-04_0134

  • The Book of Redgate: Customer Quotes

    Many organizations list customer testimonials and quotes on their websites or literature. It makes sense to show off those places where you’ve done well in hopes of influencing others to do business with you. We seek this out, and while we get a lot at Redgate, they take effort to put together.

    I was surprised to find some of these in the Book of Redgate. After all, this was an internal publication for the employees. We don’t need customer referrals.

    And yet, seeing these quotes brings me some pride. I’d hope most employees felt that way, but here are a few samples:

    “I raised an issue with Redgate regarding functionality in their SQL Compare product … and a couple of months later the items identified had been rewritten”

    “Whenever I show people any Redgate software, it’s like they just escaped from communist Russia and have a new life to live.”

    “SQL Data Generator has overnight become the principal tool we use for loading test data to run our performance and load tests”

    That last one is from Grant, before he joined us as an employee.

    There are many more, and I recently saw a large spreadsheet of quotes from customers that we can use externally. It’s amazing how many people love our tools and have benefitted from them.

    It’s nice to work in a successful and profitable business, but it’s really motivating when so many of our customers appreciate what we do.

    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.