Press "Enter" to skip to content

Category: Administration

Building Oracle’s Automatic Workload Repository in Postgres

Kellyn Gorman simulates some functionality:

Moving from Oracle to PostgreSQL means losing one of Oracle’s most-loved diagnostic tools: the Automatic Workload Repository (AWR). The good news? Most of AWR’s core capabilities – snapshot history, wait event sampling, Top SQL analysis, and buffer cache inspection – have direct, open-source equivalents in PostgreSQL.

This guide translates Oracle AWR concepts into practical PostgreSQL diagnostics using extensions like pg_profile, pg_wait_sampling, and pg_stat_statements – complete with runnable SQL you can apply to your own environment today.

Read on to see how.

Leave a Comment

DOP Non-Feedback

Rebecca Lewis tries to get some feedback:

In my DOP Feedback post last month, I shared something very frustrating. I had all the documented prerequisites for DOP Feedback in place. Query Store in READ_WRITE mode, DOP_FEEDBACK enabled at the database scope, Compatibility Level 160, MAXDOP set to 14, and a repeatable workload generating real parallelism waits — but the DOP feedback never fired. No dop_feedback_eligible_query event. No entries in sys.query_store_plan_feedback. Nothing.

I said I’d follow with a sequel when I found a workload that does become eligible, and then I’d compare it against the one that did not. Well. This is that sequel, but I still don’t have it. Today is honestly my fourth full-day of testing without triggering any DOP Feedback.

Click through to learn what doesn’t work. Or at least didn’t work for Rebecca.

Leave a Comment

Optimized Locking in SQL Server 2025

Louis Davidson tries out a new feature:

A feature I have been trying to find time to write about since it arrived is Optimized Locking, which first shipped in SQL Server 2025. This is a feature that changes the way SQL Server locks manages concurrency in a very interesting number of ways. Most of which, as I start writing this blog, I don’t understand. And I probably won’t when I finish.

What I can promise you is an example rich blog where I examine the impact of this feature.

Read on to see what Louis was able to learn.

Leave a Comment

Test and Validate Azure SQL Database Migrations

Marlon Ribunal has a tool:

Introducing azsql-migration-test, a small open-source CLI that validates your Azure SQL Database migrations against a local Azure SQL Database Developer container — the same engine as the cloud, running on your machine.

The problem: proving a migration works shouldn’t require the cloud

The tool is AI-generated and it looks like the blog post is as well, but it does look to be useful.

Leave a Comment

MSDB 110_upgrade.sql Failed with Error 574

Jordan Boich troubleshoots an issue:

SQL Server won’t start and at first, I couldn’t figure out why. When I logged off for the day on Friday, everything was happy, but when I logged on Monday morning, a heavily used test instance of SQL was not running and wouldn’t start.

Quick side note, and it’s funny looking back on now, but in the moment it sucks. You ever have to start the SQL Server Service from Configuration Manager, and when you right click -> Start, or right click -> Restart you see that green progress bar start to go and under normal healthy circumstances, it probably gets a third of the way through before SQL kicks over. But when you start to see that progress bar start to make more and more progress, you know before it even fails on you that something isn’t going to work right. You start to get that sinking feeling in your stomach. That was me.

Click through for the troubleshooting process as well as the end result.

Leave a Comment

Removing and Re-Adding Databases into Distributed AGs

Jordan Boich administers a database in a distributed availability group:

I’ve seen a lot of great blog posts and content out there talking about Distributed Availability Groups (DAGs). However, I haven’t come across much of anything covering the actual administration of them. Especially for those choosing to use a DAG as their Disaster Recovery (DR) strategy. If you’re choosing to use a DAG for your DR, then you need to know how to perform basic administration. The goal of this post is to cover the gaps in knowledge out there, and cover the nuances of DAG administration as the methods and steps reveal nuances that normal Availability Groups do not necessarily present.

This post is going to cover how to remove and add a database from a Distributed Availability Group. Removing a database from an AG and having to add it back is a common maintenance or troubleshooting step that many DBAs face. But when it comes to DAGs there are some extra nuances and steps you have to keep in mind depending on if you’re working on the global primary AG or the forwarder.

Click through for the steps, as well as some of the pain points you might run into along the way.

Leave a Comment

Working with Group Managed Service Accounts in SQL Server

Aleksey Vitsko uses a gMSA:

I plan to install several SQL Server instances across different servers. On all servers, I would like to use the same accounts for the SQL Server services for easier management. I’ve heard there are Group Managed Service Accounts (gMSA) that can be used as SQL Server service accounts, for example for the database engine service and SQL Agent service. How can I configure gMSAs?

Click through for a good solution to a security problem that becomes all the more important when you need high availability.

Leave a Comment

Impacts of Disabling Ghost Cleanup in SQL Server

Martyn Jones performs an experiment:

The first blog post introduced the ghost cleanup process, why it exists and how it works. The second demonstrated the process in action, including monitoring with Extended Events.

This post explores the ghost cleanup process further, including how it can be disabled and a high-level view of the potential impact. It also dives into data pages to show how ghost records are marked.

Disabling the ghost cleanup process can help expose internal behaviour more clearly, making it easier to observe how ghost records are marked and retained on pages.

Read on for the trace flag that can do it, as well as the consequences of doing it.

Leave a Comment

Index Rebuild Completion Percentages in SQL Server

Andrea Allred goes searching for the truth:

I truly don’t know when it happened, but over the last while I have noticed that the percentage complete on indexes has disappeared when I run sp_whoisactive. It makes me so sad! I used that functionality often to track how things were progressing in my databases. At first I thought it was a version thing and it would come back, then I wondered if it was only when I use “ONLINE = ON”, but I am seeing it blank more and more. It has left me feeling like I am missing something and today, I finally did the digging to learn how to get that visibility back.

Click through to see how.

Comments closed

Settings and Configurations to Avoid in SQL Server

Jeff Iannucci has a list:

SQL Server has quite a few instance and database configuration options, which is great if you need to make changes for different business workloads. But some of these configurations can do more harm than good, especially with modern version of the product.

As a consultant, I’ve had the opportunity to work with many clients who have a diverse range of configurations for their instances. And every now and then I see some that have been configured for what I can only presume is a predilection for danger. I mean, little to no good can come of them.

So today I wanted to share with you a few that I have seen used or changed, and to recommend to you with all the influence that I may have, that you DON’T TOUCH THEM – THEY’RE EVIL!

The contrarian in me wants to poke holes at some of these, though all of his database-level settings are defensible. On the instance level, I do have some gripes, specifically with fill factor (at least if you’re following Jeff Moden’s strategy). I thought about having a gripe around min server memory, but that’s reasonable—it’s max server memory that tends to be much more important to change.

Comments closed