Press "Enter" to skip to content

Curated SQL Posts

The Vendor-Security Researcher Relationship

Andreas Wolter shares some thoughts:

The recent public discussion around YellowKey and Microsoft’s vulnerability disclosure process has put vulnerability research, coordinated disclosure, and Microsoft’s Security Response Center (MSRC) into the spotlight.   While that specific discussion is about Windows and BitLocker, it exposes a broader problem that many researchers recognize: vulnerability disclosure is often framed as a simple responsibility of the researcher.

The idealized workflow is straightforward: find the issue, report it, wait for the vendor, and accept the outcome.

But coordinated disclosure cannot be a one-way obligation.

Andreas shares some perspective from having been a top security person on the SQL Server team. Along the way, he hits one on of my bugbears: the fact that there is no easy way to tell exactly what login X (or user X) can do on a SQL Server instance. The closest I ever got was to impersonate user X and run sys.fn_my_permissions() in the context of that user. But even that isn’t perfect.

Leave a Comment

The Muddy World of Hybrid Environments

Deborah Melkin muddies up the waters a bit:

My first reaction to this sentence was: Oh look, he assumes that everyone is in the cloud…

My next reaction was: Oh look, he acknowledged that maybe everyone isn’t in the clouds in his follow-up examples.

Since the cloud was introduced, the assumption was always going to be everyone will moving to the cloud. “You’ll be behind if you don’t learn the cloud,” they said. Then as people either moved or started looking into moving their databases, they realized they just couldn’t – whether it was due to missing features, higher than expected costs, etc. There was always some reason.

Click through for some of the challenges and realities of organizations where certain cloud-first or cloud-only services would be a major challenge, versus other services that are typically easier to deal with.

Leave a Comment

Gotchas for a Move On-Premises

Brent Ozar lists three pain points:

For T-SQL Tuesday #199, Koen Verbeeck posed an excellent question: if your company moved up to the cloud, but after migrating, had to come back on-premises, what would be the big problems?

I’ve had clients in this exact situation! Here are some of my favorite gotchas from those experiences.

Click through for those three. I’d say that the first one is a major issue and will probably be one for the next couple of years—unless the bottom drops out sooner than I expect and we suddenly have a rush of used hardware from highly unprofitable organizations hit the market.

Leave a Comment

Thoughts on a Cloudless World

Mike Donnelly has some tongue-in-cheek responses:

There are some serious angles to this topic, and I have had conversations with people at conferences who are doing a remigration from the cloud, but it feels like the exception not the rule. It is interesting to think about. I spent most of my career working with on-prem SQL Server, but there was a period of about 10 years (the consulting years) where I didn’t touch anything that wasn’t in the cloud. The past several years have been working in a hybrid environment, but most of the work has been moving things to Azure and Fabric. Koen has some prompts for what our blog posts could be about, but rather than dive deep into any one thing I’m going to go with the blog writer’s best friend – a top 10 list.

The funny thing is, in my time as an on-premises DBA, I never dealt with hardware and didn’t have access to the server room.

Leave a Comment

The Importance of Working with People

Mark Wilkinson hits migration from a different angle:

I haven’t written a blog post (here) in over 5 years, so what better time to start things back up than a T-SQL Tuesday? Big shout out to Koen Verbeeck for hosting this month, and picking a great topic: Back to on-prem?

As someone that just ended a 10+ year stint managing a hybrid environment, this topic is very near and dear to me. I went back and fourth on what to write about for this one. There are a lot of great topics. Reliability and observability almost won out but instead I landed on maybe an unexpected topic: soft skills.

Regardless of whether your company is fully on-prem, fully in the cloud, fully hybrid, or fully without a clue, Mark’s advice hits home. And is also one of those things I’ve struggled with.

Leave a Comment

Skills for Cloud-to-On-Prem Migration

Reitse Eskens focuses on a set of skills:

This month, Koen Verbeeck invites the blogging community to write about their thoughts on returning to on-premises. What could be struggles, things we have to re-learn, etcetera.

When I read the invite, it immediately sparked inspiration, because there are increasing rumours around cloud exits. People musing about ‘what if’. Some clients reference these questions, but so far no one has directly asked me one with the intent of moving forward with it.

Click through for Reitse’s thoughts.

Leave a Comment

Generating Local Text Embeddings in SQL Server 2025

Greg Low continues a series on local text embeddings:

In the first article of this series, I explained how to install and configure Ollama to host text embeddings models locally. I also demonstrated how to install Caddy as a proxy to allow SQL Server to use Ollama via https-based calls. In this article, I’ll show you how to make use of this at the SQL Server end.

Greg mentions a few embedding models, but the one I’m pushing right now is Microsoft Research’s Harrier OSS v1 model, specifically the 600m parameter version. It does extremely well in the MTEB leaderboards (the 27b variant is at the top of the board as of June 2026) and has a permissive license. It generates vectors in 1024 dimensions, so the embeddings are a bit chunky, taking up 4kb apiece. But the results are really good.

Leave a Comment

Bloom Filters with Valkey

Jay Miller checks for a record:

A bloom filter is a small, probabilistic data structure designed to answer one question: “Have I seen this item before?” It provides two potential answers: Absolutely Not, and Probably.

You may think that 100% Yes or No would be better but here’s the thing, probably is really fast and you’re really concerned about the Absolutely Not’s taking up unnecessary connections.

The article speaks to Aiven’s implementation of a Bloom filter in Valkey, but does get into some neat details on bloom filters in general. And if you want to go further down that route, Paul White explains how SQL Server uses Bloom filters.

Leave a Comment

Testing SQL Code in Python

Jamal Hansen writes some tests:

I once had a query that ran fine for months. Then someone added a column to the source table and a SELECT * downstream started returning unexpected data. The query didn’t error. It just silently gave wrong results. A test would have caught it immediately.

Schema changes break queries silently. Refactoring a CTE can shift results in ways you don’t notice. New data patterns expose assumptions you didn’t know you made. SQL deserves the same testing discipline as the rest of your code, and Python makes it straightforward.

PyTest, the library Jamal uses here, is one of my favorites for this kind of work. You can build up tests without a lot of ceremony and it’s pretty easy to deal with for most use cases.

Leave a Comment

The Pain of Moving Indexes between Filegroups

Erik Darling explains a process:

At some point you’re going to want to move some indexes to a new filegroup. Maybe you’re separating data across storage, maybe you’re cleaning up after someone who put everything on PRIMARY and walked away, maybe you’ve got your reasons and they’re none of my business.

Whatever the cause, you’d think this would be a solved problem in a database that’s been around since the Clinton administration.

It is not.

Some days, I’m convinced that the only way to win is not to play at all. Erik explaining how to migrate LOB data across filegroups fits that bill perfectly.

Leave a Comment