Press "Enter" to skip to content

Curated SQL Posts

What Was New for T-SQL Developers in SQL Server 2017

Jeff Taylor has a (short) list:

How many of us still type LTRIM(RTRIM()) today? You don’t have to anymore. SQL Server 2017 finally fixed that, along with a few other string headaches. This is part 3 of my “What’s New in SQL Server for the Developer” series, based on my session. So far we’ve covered 2012 and 2016. Today it’s 2017.

And, in addition to simplifying the LTRIM(RTRIM()) pattern, TRIM() also allows you to trim non-space leading & trailing characters, as Jeff shows.

Leave a Comment

Ingesting On-Premises Data into Microsoft Fabric via Notebooks

Nikola Ilic shows off a solution:

For most of Fabric’s life (and it’s been more than 3 years now), the answer to “can my Fabric notebook read our on-premises SQL Server?” was… Eehhmm, no… The on-premises data gateway worked for pipelines, Dataflow Gen2, and mirroring, but not for notebooks. The standard workaround was to ingest the data with a pipeline first, and only then pick it up in Spark. In February 2026, the Execute Query REST API opened a side door: a notebook could call it to run Power Query M inside a Dataflow Gen2 item (gateway included), as long as the query finished within 90 seconds.

The November Fabric feature summary turned that into a native notebook feature. A new module, notebookutils.powerquery, runs Power Query M from a notebook through an existing Fabric connection, including a gateway-backed one! The result comes back as a PySpark DataFrame.

But read on for the limitations in this solution.

Leave a Comment

Fixing a PAGELATCH_UP Issue in SQL Server

Anna Hoffman reviews a paper:

This is a really interesting type of engineering paper. No new architecture, no new theory. Just a team looking hard at a bottleneck everyone had accepted for twenty years, and removing it.

The bottleneck was a single byte. Yes, really.

Concurrent Updates to Pages with Fixed-Size Rows Using Lock-Free Algorithms (VLDB 2020) is about how SQL Server keeps track of free space, and how fixing one small piece of that produced up to 5x throughput on some workloads.

Read on for Anna’s synopsis and an example of where it could help. This is built into SQL Server 2019 and later, so there’s nothing special to do, other than to be on a version of SQL Server released in the last eight years.

Leave a Comment

Importing SharePoint Lists into SQL Server via Power Automate

Andy Brownsword performs a translation:

SharePoint Lists provide a solid alternative to having business reference data tucked away in Excel. We have options through Data Factory or Fabric to utilise these, but for small lists and operational systems, something more lightweight might suit better.

Here we’ll look at a way to achieve that with Power Automate to load into SQL. We’ll use a list of book club members and their books as an example.

Read on for the process.

Leave a Comment

Mostly-On for Good Enough DR

Daniel Hutmacher has kept the robots busy:

For large parts of 2026, I’ve been working on building a commercial SaaS product (more info is coming) that will run on a bunch of client databases across multiple SQL Server Express containers. With that comes the complexity of maintaining a backup and DR strategy, which can be a hassle when you don’t even have SQL Server Agent, S3 backups, and certainly not clustering or Availability Groups. So the first thing I did was to hobble together some shell scripts that would run on a cron schedule on the host VMs. That worked.. fine, I guess. Backups were taken and shipped to a remote network share.

But you can already see where this is going.

Daniel has put together a solution to assist with automated backups and log shipping of SQL Server instances, and it even works with Express Edition. Click through to learn more and to grab the solution for free and under MIT license.

By the way, SQL Server 2025 Express Edition is a lot more capable than prior versions. You can now have 50GB databases in Express Edition and can use 4 cores on one socket (up from before). Your buffer pool is still limited to 1410 MB, but it’s no joke for lightweight database operations.

Leave a Comment

Validating JSON in SQL Server and .NET

Syed Salman validates some JSON:

Over time, I’ve encountered various issues with JSON during API (application programming interface) integration and data processing. Sometimes, a third-party API returns a different format. Other times, some fields are missing.

These problems are usually identified from API errors, incorrect data in the database, or issues reported by users.

Most developers assume the JSON coming from their own application or from a third-party API will always be correct, so sometimes skip validation to save time.

The result? Potential issues later on: runtime errors, incorrect data, or production issues that are difficult to debug.

The, err, people of distinguished age in the audience will probably look at this and say, “This was the whole point of XML.”

Leave a Comment

A Survey of Triggers in Microsoft SQL

Aleksey Vitsko gives us some triggers:

A trigger in SQL Server (and Azure SQL) is a special kind of stored procedure that executes automatically in response to a specific event inside the database engine.

A trigger can be bound to a database object, to database scope, or to a server scope. Unlike normal stored procedures, a trigger is never called manually.

Triggers are tightly integrated with SQL Server’s internal event system. When an event fires, SQL Server executes the trigger as part of the same transaction (for DML and many DDL operations), meaning the trigger can inspect the change, modify or add data, log to a table, or even roll back the entire transaction.

Read on for the taxonomy and when you might use each.

Leave a Comment