Press "Enter" to skip to content

Curated SQL Posts

The Challenge of using Questions as Slide Titles

Simon Rowe explains a challenge:

The importance of an effective slide title cannot be overstated. Positioned in prime real estate at the top of the page, it is often where an audience’s eyes will land first. With that in mind, it is worth investing time to craft a title that introduces the content below and establishes a clear purpose. Too often, this valuable space is used for purely descriptive statements. Let’s look at an example.

Read on to see one example, showing how the change of titles and a bit of thought around the use of color as an identifying feature can make a big difference for viewers.

Leave a Comment

Permanently Empty Statistics

Guy Glantser takes us through an edge case:

Many SQL Server DBAs rely on automated statistics maintenance solutions such as Ola Hallengren’s maintenance scripts. These scripts typically update statistics only when the modification counter exceeds a threshold.

But there is a corner case that can cause statistics to remain empty forever, and many DBAs are not aware of it.

Read on to see how you can end up with no statistics at all on a table.

Leave a Comment

The State of Vector Indexes in SQL Server 2025

Rebecca Lewis separates marketing hype from reality:

Microsoft’s entire marketing pitch for SQL Server 2025 is ‘the AI-ready database.’ It went GA on November 18, 2025. We are now four months in. Here is what is actually GA, what is still behind a preview flag, and what that means if you are evaluating this for production.

Read on for a list, as well as a summary of Erik Darling’s great work on the topic.

My take on this is that vector indexes are where columnstore indexes were in SQL Server 2012: a neat idea, but not ready for prime time. It took until 2016 before columnstore indexes were actually worthwhile (primarily, the introduction of clustered columnstore indexes and ability to rebuild indexes), so we’ll see if it takes as long for vector indexes to get all of the necessary functionality.

Leave a Comment

What’s New in SSIS 2025

Koen Verbeeck actually gets an article’s length out of this:

There’s a new version of SQL Server released and we’re mainly an on-premises SQL Server shop. We’ve been using Integration Services (SSIS) for years now for all our ETL and data integration needs. With Microsoft’s focus on cloud (Azure and Fabric), does it make sense to upgrade our SSIS packages? Are there any new features?

Click through for the answer, though “stuff that’s gone away” or “stuff that you have to change because of drivers” make up almost 100% of this.

Leave a Comment

Getting Help in MicrosoftFabricMgmt

Rob Sewell continues a series on the Microsoft Fabric management Powershell module:

Most of this blog post is going to be more about PowerShell in general than this specific module. The MicrosoftFabricMgmt module has over 295 cmdlets, which can be overwhelming at first glance. But PowerShell’s built-in discovery tools make it easy to find what you need. Knowing how to use a command is always available in the shell itself. You can find out how to use a function, what parameters it takes, and see examples of its usage without ever leaving the command line.

I have been using PowerShell for over a decade, and I still rely heavily on Get-Command and Get-Help to explore new modules and refresh my memory on ones I haven’t used in a while. In this post, I’ll show you how to use these tools effectively to navigate the MicrosoftFabricMgmt module.

Read on to see how you can get help. At least, on that front.

Leave a Comment

Restoring Backed-Up Items in Microsoft Fabric

Gilbert Quevauvilliers grabs an item from backup:

In my previous blog post I had shown you how to backup your Microsoft Fabric Items: Backing Up Your Microsoft Fabric Workspace: A Notebook-Driven Approach to Disaster Recovery – FourMoo | Microsoft Fabric | Power BI

The next natural question is what happens when you want to restore one if the items that were previously backed up.

In the steps below I will show you how to do this.

Read on to see how it works and a bit of pain that you might experience.

Leave a Comment

Dockerizing Shiny and RMarkdown Apps

Thomas Williams builds a container image:

Running R Markdown via Docker is a big help with deploying those analysis and reports for others to use.

While there are alternatives for deploying R Markdown — the most popular being Shiny Server — they add the hassle of matching R and package versions to the machine where the code was developed, may require IT help, and mean sharing disk, CPU, and memory with other apps on the same server. And there’s also licensing requirements & limitations for the free version of Shiny Server.

R Markdown on Docker avoids some of these issues; a single Docker container = a single app.

Click through for a simple RMarkdown file and Dockerfile.

Leave a Comment

Thoughts on Database Keys and Constraints

Lee Asher digs into keys:

Keys come in two basic flavors: natural and surrogate. Natural keys, as their name suggests, are values that occur naturally in the data. They have real-world or business meaning: an email address, the street address of a building, the serial number of an inventory item, etc. In contrast, a surrogate key (sometimes called a synthetic key) is a value added to each row upon creation. A surrogate exists only within the confines of the database; it has no meaning outside of it.

A natural key often contains two or more columns. For instance, the key for a table of vehicle types might include the make, model, year, and trim level, all four columns of which must be combined to create the value that uniquely identifies each row. Surrogate keys are always a single column, though the value of each key may be anything you choose – as long as each value is distinct from all others.

One thing I would very strongly note here is that surrogate keys are a physical data model concept. I’m a firm believer that you almost always should have a surrogate key, but there must be a natural key, even if you don’t put an actual constraint on it. Though I do recommend having a unique key constraint on the natural key as well as a primary key constraint on the surrogate key.

Leave a Comment

SESSION_CONTEXT and Parallelism Bug in SQL Server

Rebecca Lewis lays out the consequences of an existing bug:

If you use SESSION_CONTEXT() in any query that can run with parallelism, you may be getting wrong results right now and not know it. This is not new. It has been a documented known issue since January 2022. It shipped unfixed in SQL Server 2019, 2022, and 2025 — and as of 2025 CU2 (February 12, 2026), it is still not resolved.

This is easy to miss. It’s buried in the Known Issues section of CU release notes, and the symptoms — wrong results or dump files — do not obviously point back to SESSION_CONTEXT.

Read on to learn more about the issue, the current workaround, and how you can discern whether you are experiencing the issue today.

Leave a Comment