Press "Enter" to skip to content

Curated SQL Posts

Azure Arc: Lots of Privilege

Andreas Wolter notes some security requirements:

Azure Arc for SQL Server comes with a so-called “least privilege mode.”

But certain Azure Arc components still execute SQL Server operations with sysadmin authority, which can expose that authority to database-scoped code.

Fabiano Amorim recently demonstrated how a database-scoped principal can take advantage of exactly this privileged execution context to escalate to sysadmin through a database-level DDL trigger: How Azure Arc allows a DB admin to become SQL Server sysadmin – the vulnerability explained

Fabiano covers the exploit itself in detail. What I want to put under the magnifying glass here is the “least privilege” mode itself – a topic I have written about extensively:

Click through for Andreas’s take on this.

Leave a Comment

An Outage from Corruption

Rob Farley tells a story:

Naturally when there’s a failure, there are questions about High Availability solutions. If the customer has an Availability Group, maybe they’ve avoided an outage completely – the primary fails over to the secondary, and the race starts to get the original machine back in case another failure (on the new primary) happens. Those situations aren’t the ones that keep coming back to mind, but are still stressful for the temporary loss of the safety net.

The bigger issues are when there is no quick failover available. About thirty years ago, I was dealing with a SQL Server 6.0 environment, where the customer’s DBA was cycling tapes (yes, tapes) for differential backups, except that he’d reused the tape that the full backup was on. When that system went down, I had a quick and harsh introduction to salvaging files off the disks from a failed computer. Fun times.

Also, it sounds like Rob’s surgery from last month has gone well, so hopefully he remains on the road to recovery.

Leave a Comment

Recovering from Ransomware

Vlad Drumea tells a story:

This is about the outage caused by a ransomware attack in October 2020 on my then employer, Steelcase, and the 2+ weeks required to get everything back online.

You can read more about the two-week halt of global order management, manufacturing, and distribution, as well as the fact that forensic investigation found no evidence of exfiltration, in this BleepingComputer article.

Disclaimer: I mention and link some products and companies in this blog post. This isn’t a sponsored post, and none of these companies have had a say in what I’m writing here.

Click through for Vlad’s story.

Leave a Comment

Managing AI Context

Eugene Meidinger has a pair of articles. The first one covers the use of Markdown for building AI context:

When performing agentic development, most of your time will be spent either writing prompts or context files in Markdown (.md) files. This is a simple format used for documentation and notetaking, but which is also easy to read or write for humans and agents. You have almost certainly encountered Markdown before, but you may not have known it. Markdown is used by AI agents, in code documentation, and in some chat programs. Even Microsoft Teams supports a subset of Markdown.

Markdown is extremely common in more than just AI development work, so it’s definitely worth knowing.

The other is a guide to understanding and managing AI agent context:

The most important task for you during agentic development is to create, gather, and curate context. Context is anytext (or images) that the model ingests to produce a more relevant and useful response. Providing the right context at the right time helps agents produce better results; it’s about more than just writing markdown files:

Leave a Comment

Mirroring Data from SQL Server into Microsoft Fabric

Greg Low has a guide:

Mirroring in Microsoft Fabric is useful when you need to make SQL Server data available in Fabric. Perhaps in OneLake, for example, if you need to use the data for reporting, analytics, notebooks, or another Fabric workload.

However, it’s not suitable for everything, as I’ll explain in this complete guide to mirroring data from SQL Server to Microsoft Fabric.

Before we get started, a note about compatibility. Since SQL Server 2005, there’s been a type of database mirroring totally unrelated to Microsoft Fabric mirroring. I wish these types of terms weren’t so overloaded but, in this article, when I say mirroring, I’m talking only about Fabric mirroring.

Click through for a FAQ-style introduction.

Leave a Comment

Blind Spots and Troubleshooting a Cluster Problem

Alexander Arvidsson tells a story:

The patient was a misbehaving SQL Server 2014 running in a two-node cluster. It was your garden-variety cluster with a shared disk and a remote witness. In my experience, as long as the customer has enough know-how to maintain a cluster like this, it’s essentially bulletproof.

This specific cluster was not.

Click through for the story, as well as a reminder of why people in mission-critical situations tend to follow checklists and say the items aloud.

Leave a Comment

When Ints Overflow

Aaron Bertrand hits an outage in both directions:

The Stack Overflow database has a long lineage, and a lot more warts than what’s exposed in Stack Exchange Data Explorer (SEDE). Many of the core tables were created a decade before I joined the staff in 2021, and they grew far larger than could have been envisioned back then.

One of those tables is UserHistory. This table uses an identity column as the clustered index and primary key, and records all kinds of information about each user’s activity on the site. From changing your profile picture, to earning a new privilege, to changing a preference, to something as simple as logging in or out. Each event generates at least one new row in UserHistory. At peak popularity, this table would grow quite quickly and, as the application became more complex, more and more categories of activity and state would get written there.

Click through for the story of an outage, and then another outage with a very similar shape.

Leave a Comment

DBAs as Cost Centers

Warwick Rudd lays out the bitter truth:

That has been the problem for as long as there have been database administrators, and I don’t think we’ve ever really solved it.

Here’s what I mean. A DBA doing the job properly produces nothing you can see. The environment is up. The queries return. Nobody rings anybody at two in the morning. And because nothing appears to be happening, the people looking after it start to look like a line of cost with nothing attached to it.

In the traditional sense of how businesses think about this, they’re right. Nothing a DBA does makes money. What a DBA does is save money, which is a much harder thing to put in front of a board.

Warwick’s post moves in the direction of managed services. I’d move in the direction of understanding and vocalizing the benefits you bring to the table as a DBA.

Leave a Comment

Scatter and Sampling in Power BI Core vs Deneb

Kerry Kolosko shows some comparisons:

In almost a decade of building Power BI reports, a common blind spot I still see from colleagues regards data point limits in core visuals — largely unnoticed until someone maps their data and finds entire regions are missing.

Compare the following lasagne plot created using a Power BI core visual scatterplot with one created using a Power BI custom visual (Deneb).

Click through for the difference. The more I see Deneb, the more impressed I am with it. I’ve seen people do some wild things with it while still working just fine in Power BI. There’s even compatibility with Power BI Report Server, if you can believe it.

Leave a Comment

Dealing with Outages

Jeff Taylor tells a pair of stories:

It was a normal day at the start, checking on the servers, responding to email, then all of a sudden the office went dark and silent…we had just lost power!

Everyone started stirring and then getting up, checking that our phone system was on backup power, and someone called the power company to report it and get a status of when the power would be back on.

Extreme heat, smoke, and servers are not a great combination.

Leave a Comment