Press "Enter" to skip to content

Category: Administration

Sending Messages from SQL Server 2025 to Slack

Aaron Bertrand fires off a message:

In an earlier tip, A history of accessing REST APIs and web pages from SQL Server, I talked about reaching out to external endpoints from SQL Server, including the new sys.sp_invoke_external_rest_endpoint procedure that hit the on-premises editions in SQL Server 2025. This seemed like an ideal use case to enhance our current solution for sending a message to Slack: using xp_cmdshell to call a PowerShell script that calls Invoke-RestMethod. In this tip, I’ll describe how we changed our implementation and why it is a marked improvement for us.

When I did this same thing, I ended up using CLR, as the customer I did it for used SQL Server on Azure VMs and not Azure SQL Database.

Leave a Comment

Postgres Index Corruption after an OS Upgrade

Laurenz Albe has me concerned:

Most major Linux distributions have upgraded to the GNU C library version 2.28 or later. Therefore, there is a growing awareness that an operating system upgrade can lead to index corruption. However, rebuilding all your indexes can slow down the upgrade process considerably. In this article, I want to discuss how you can avoid rebuilding more indexes than necessary.

Read the whole thing if you are a Postgres DBA.

Leave a Comment

What VACUUM Really Does in Postgres

Radim Marek explains:

There is common misconception that troubles most developers using PostgreSQL: tune VACUUM or run VACUUM, and your database will stay healthy. Dead tuples will get cleaned up. Transaction IDs recycled. Space reclaimed. Your database will live happily ever after.

But there are couple of dirty “secrets” people are not aware of. First of them being VACUUM is lying to you about your indexes.

Click through to learn more.

Leave a Comment

Extension Management in Postgres

Kellyn Gorman doesn’t just install a bunch of stuff:

PostgreSQL’s true power doesn’t just come from its rock-solid relational engine, but it’s the fact that Postgres can grow with you. Extensions allow you to bolt on new capabilities, enhance performance, integrate external tools, and transform the database into something far more powerful than its default installation, which is something I’m really learning to love.

From pg_stat_statements to pgvector, logical decoding plugins, job schedulers, and custom procedural languages, Postgres extensions behave like feature packs you can enable at the database level. That also means DBAs must know how to inspect, maintain, and manage them just as carefully as any schema or server configuration.

Read on for several tips for proper extension care and feeding.

Leave a Comment

Troubleshooting a Distributed Availability Group Failure

Jordan Boich digs in:

To give some background on this topology, they have a DAG comprised of two individual AGs. Their Global Primary AG (we’ll call this AG1) has three replicas, while their Forwarder AG (we’ll call this AG2) has two replicas. The replicas in AG1 are all in the same subnet and all Azure VMs. The replicas in AG2 are all in their own same subnet and all Azure VMs.

By the time we got logged in and connected, the Global Primary Replica was online and was able to receive connections. The secondary replicas in the Global Primary AG however, were unable to communicate with the Global Primary Replica. This is problem 1. The other secondary problem is that several databases on the Forwarder Primary Replica were in crash recovery. This is problem 2. Considering problem 2 was happening in the DR environment, that was put aside for the time being.

Read on for the troubleshooting process and solution.

Leave a Comment

Thoughts on Renaming sa

Andreas Wolter asks, what is in a name?

This is another one of those subjects that keep circulating: should you rename your sa account?

Plenty of “security check” scripts swear you should. Meanwhile, when you talk to actual humans in the real world, you’ll notice that almost nobody does it. (Funny how that works.)

So what does Sarpedon Quality Lab® recommend – and why? Our answer (read to the end) may surprise you.

Before reading Andreas’s post, I wanted to note that, when I was a DBA and had control of such things, I would actually rename the sa account and then create a separate account called “sa” with zero permissions, not even the ability to connect. I never considered it a critical part of a security posture, but knowing how many scripts try to brute-force an account called sa, I figured setting up a false front like that would add some protection on the margin.

After reading Andreas’s post, I wasn’t aware that doing so would break replication, though it makes sense because I wasn’t using replication at that time. Making sa’s password extremely long is also a good idea.

Leave a Comment

Exploring the Fabric Capacity Metrics App

Nicky van Vroenhoven wants to get the number:

If you find yourself checking the Metrics app and see a spike in usage you might want to analyze that. How many times did you have to click to get exactly the column you needed? Or before you were able to click any column at all?

Read on to see how many licks it takes to get to the center of a Tootsie Roll Pop. As well as how to deal with a visual not based in log units.

Leave a Comment

Comparing Postgres Write-Ahead Logging to Oracle Redo Metrics

Kellyn Gorman makes a comparison:

For anyone who has spent years tuning Oracle redo, the first time you look at PostgreSQL’s pg_stat_wal view may feel a bit underwhelming. Everything works, but the instrumentation isn’t the same and you suddenly realize how much Oracle has spoiled you with it’s advanced and expensive features.

As I’ve been working deeper with PostgreSQL, I keep getting questions about how its WAL (Write-Ahead Logging) data compares to Oracle’s redo performance metrics. Let’s break it down in a way that makes sense for people who’ve been living in the Oracle world for years.

Click through to see what each competitor gets you.

Leave a Comment

Accessing a Former Employee’s Power BI Workspace

Gilbert Quevauvilliers says it’s MY workspace now:

One of the common challenges I’ve seen in organizations is when a team member leaves and their Power BI reports are stored in their personal My Workspace. These reports often contain valuable datasets and dashboards that are still in use or need to be maintained. So, how do you access and recover these reports?

In this blog post, I’ll walk you through the steps to access a former employee’s My Workspace, assign it to a supported capacity, and download the reports using Fabric Studio.

Read on for the instructions, and be sure to do the “Look at me. I am the captain now” meme when it works.

Comments closed

An Overview of PostgreSQL Internals

Elizabeth Christensen shows some of the ways to view internal information in PostgreSQL:

Postgres has an awesome amount of data collected in its own internal tables. Postgres hackers know all about this  – but software developers and folks working with day to day Postgres tasks often miss out the good stuff.

The Postgres catalog is how Postgres keeps track of itself. Of course, Postgres would do this in a relational database with its own schema. Throughout the years several nice features have been added to the internal tables like psql tools and views that make navigating Postgres’ internal tables even easier.

Today I want to walk through some of the most important Postgres internal data catalog details. What they are, what is in them, and how they might help you understand more about what is happening inside your database.

Click through for an overview of catalog tables and catalog views (similar to SQL Server’s system tables and Dynamic Management Views, respectively).

Comments closed