Press "Enter" to skip to content

Curated SQL Posts

Using Entra ID Authentication in Azure Database for PostgreSQL

Taiob Ali wants to use Entra for authentication:

During the livestream of my session at the POSETTE: An Event for Postgres 2026 conference, I received the following question on the hallway track via Discord:

I have one question : I added an Entra group as PostgreSQL Entra administrator, created/mapped the PostgreSQL role for that group, and granted permissions to that group. I am a member of the Entra group, but I still cannot log in with my own Entra user. Does Azure PostgreSQL allow group members to authenticate through the group role, or must each user also be individually created/mapped as a PostgreSQL role?

Read on for Taiob’s full answer.

Leave a Comment

Major Announcements from Microsoft Build 2026

James Serra puts together a list:

Once again there were a number of Microsoft Build announcements related to data and AI, and some were very impressive. Below are my favorites. I am prioritizing the data announcements first, because that is where my brain naturally goes (and because AI without good data is just a very confident intern with access to a keyboard).

The biggest announcements across Microsoft Fabric and databases can be found in the Microsoft Build 2026: Building agentic apps with Microsoft Fabric and Microsoft Databases blog post.

This looks like another year of Fabric + AI as the (almost) entire data platform focus at Build.

Leave a Comment

Fabric Data Agents and Power BI Row-Level Security

Jens Vestergaard digs into a security challenge:

In the last post I walked through auditing a semantic model before connecting it to an AI tool like Fabric Data Agent. Descriptions, naming, explicit measures, star schema: the things that decide whether a Fabric data agent generates an accurate query or a confident wrong one. I left one thing out on purpose, because it deserved its own post and because I got it wrong the first time I thought about it.

Security.

Click through for a few subtle security issues that automated agents can expose. It turns out to be a lot more challenging than you may first expect, just as Jens discovered.

Leave a Comment

Storage of XML Indexes in SQL Server

Hugo Kornelis continues a series on storage structures:

After covering on-disk rowstorecolumnstore indexesmemory-optimized storage, and memory-optimized columnstores, it is now time to turn our attention to storage structures that are used for specific datatypes only. The first “victim” will be the XML index.

When you need to store XML data in a SQL Server database, you can choose between two data types, each with their pros and cons. You can choose to store the XML data as nvarchar(max). This preserves the exact content of the XML as you received it, which might be required for legal reasons. However, any query that cares about the specific content of the XML data will have to resort to very complicated string expressions.

The xml data type shreds the XML and stores the content in an internal format, that allows SQL Server to work with for instance XQuery or XPath expressions. This format also saves space as compared to the nvarchar(max) alternative. However, when you query the data, the content will be the same, but formatting and whitespace might be different.

The latter also allow you to build indexes on top of them, and those indexes are what Hugo covers.

Leave a Comment

PBIR Files and Second-Class Report Server Citizens

Ronald Kraijesteijn tells a tale of woe with Power BI Report Server:

The setup is an on-prem Power BI Report Server, fully patched, running the May 2026 release (1.26.9637.31070, build15.0.1121.109). I had a report I needed to publish, but first I had to swap a whole batch of connection strings. Doing that by hand in Desktop is miserable, so I took a shortcut that turned out to be the root of all my pain. More on that below.

The error was a generic mess and the cause was getting too high for your station and actually expecting something from Power BI Report Server.

I say this as a fellow long-time Power BI Report Server sufferer.

Leave a Comment

Optional Parameters in DAX UDFs

Marco Russo and Alberto Ferrari give us an option:

When Microsoft announced that DAX User-defined functions (UDFs) are generally available (GA), another new feature was also announced: it is now possible to define optional parameters in a function and assign them default values.

A parameter is optional when the caller can leave it out. In that case, the function still needs a value to work with, so it falls back to a default. DAX provides that default through an expression written directly in the function signature, next to the parameter it belongs to. This is the mechanism we describe in this article.

Read on to see how it works.

Leave a Comment

Vector Calculations in SQL Server

Greg Low continues a series on vector data in SQL Server

:In this article, I’ll explain how to implement vector search in SQL Server using the VECTOR_DISTANCE and VECTOR_SEARCH functions. You’ll learn how vector indexes work, when to use them, and what the key trade-offs are — including the current read-only table limitation. I’ll also cover the latest syntax changes in Azure SQL Database, where that limitation has already been lifted.

Click through to learn more.

Leave a Comment

pg_ducklake 1.0 Now Available

Qiaosheng Liu makes an announcement:

We started pg_ducklake in January, and today we are releasing v1.0, the first production-ready version. Three things define this release:

  1. Full DuckLake workflow. v1.0 brings most of DuckLake’s feature set to PostgreSQL SQL: DML, schema evolution, time travel, partitioning, sorted tables, the variant type, ACID transactions, and automatic maintenance. Every table stays open to any DuckDB client.
  2. Production-grade. pg_ducklake is tuned to live inside an OLTP database: stable under continuous load, disciplined with memory, and offering the fastest ingestion path for DuckLake.
  3. Standalone and compatible. pg_ducklake started as a fork of pg_duckdb. v1.0 no longer forks or depends on it. It is a self-contained extension, built on a reusable kernel we extracted called libpgduckdb, and it stays compatible with pg_duckdb.

Read on to learn more about what’s in this production release.

Leave a Comment

Log Records in SQL Server

Paul Randal explains what a log record is:

The simplest definition of a log record: it describes a single change to a database. A single operation in the database may cause multiple changes, but each change will usually have its own log record to describe it. An example of this is updating a column in a single row—it will do the following:

Read on to see what it will do, what it looks like, and what kinds of log records exist.

Leave a Comment

What “Filtering Early” Really Means

Louis Davidson lays out the facts:

Which brings me to the point. There is a myth that goes around that you need to place filters in your SQL statements as early in the statement as possible. Most of this is due to the wild misunderstanding of how a query is executed (versus how your query is processed, which I covered last week.) The actual issue here is that the concept of filtering early is actually true, but certainly not in the way it has been taught.

SQL is a fourth-generation language and implementations approach it. With fourth-generation languages, the actual query you write is not the thing that runs, and there is an entire process to interpret what you wrote and execute operations that meet the intent of your query in the most efficient manner.

Now, this is where someone chimes in and gives all of the circumstances in which T-SQL (or pick your variant) fails to live up to its fourth-generation heritage, such as particularly complex queries, nested views with multiple joins, you using mechanisms that force a specific plan, etc. This is because real life is messy, as Louis shows in some of the examples.

So what’s the point of the first paragraph, then? Because I never miss an opportunity to talk about language generations.

Leave a Comment