Press "Enter" to skip to content

Curated SQL Posts

An Initial Review of Fabric Apps

Teo Lachev takes a look:

Before diving in, let’s clarify the terminology. Power BI and Fabric have abused the word “app” to cover several very different things:

  • Power BI template app – A packaged solution that a software vendor can distribute through Microsoft AppSource. Customers install it, connect their own data, and use the included semantic models and reports.
  • Power BI workspace app – A way to package and distribute selected workspace content within an organization. For example, Finance can publish reports to users who are not members of its workspace.
  • Power BI organizational app – An evolution of the workspace-app experience that supports creating and distributing multiple apps from content in a workspace.
  • (NEW) Fabric App – A custom-coded web application, typically built with JavaScript/TypeScript and a web framework such as React, that is deployed to Fabric and can use managed APIs, authentication, and data services. “Custom-code app” would be a more revealing name. Unlike a Power BI report, it is an application artifact with its own user experience—even if the result looks suspiciously report-like.

Read on to see what Teo likes about them, the trade-offs you’ll have to make when using them, and some of the limitations in the feature today.

Leave a Comment

Methods to Enable Query Store

Lee Markum has a few:

Query store is a valuable tool for people managing SQL Server, whether that’s on-prem, in an IaaS scenario or AWS RDS, Azure Managed Instance or Azure SQL DB. There are several possible ways to enable the Query Store.

This post will explore some of those methods. If you’re not familiar with Query Store, then go read this post. If you need help getting started with PowerShell, then start here, and that will help the later examples make a bit more sense.

Click through for examples using T-SQL and dbatools.

Leave a Comment

CLR and Memory Usage

Andy Levy troubleshoots an issue:

A large Availability Group (100+ databases) started to report all replicas in an Unhealthy state. It was a Tuesday afternoon with no planned activity aside from Normal Business Processes™️, so a few alarms went off. After about a half hour, it looked like things were back in sync, everything healthy…and then it happened again. And a couple more times. The situation went on for about 2 1/2 hours. Ultimately it settled out with all the database replicas getting back into a healthy and synchronized state on their own, everything intact.

This is a good reminder that there are more things in heaven and earth, Horatio, than are dreamt of in your buffer pool.

Leave a Comment

Immutable Backups in Azure SQL DB and MI

Dinkar Nethi talks about a backup option in Azure:

Ransomware attacks are becoming increasingly sophisticated. Attackers no longer focus only on encrypting or stealing production data. They also target backups, knowing that eliminating an organization’s recovery options can turn a security incident into a prolonged business disruption.

Imagine discovering that your database has been compromised, only to find that the backups you were counting on have also been deleted. Even with a comprehensive backup strategy, recovery becomes significantly more challenging when attackers can tamper with the very data needed to restore business operations.

That’s why backup immutability matters.

I imagine that the only thing allowed to modify or delete these backup files is the automated cleanup process that runs on a schedule and ages out old backups. But it’d be interesting (in a cruel way) to think about how to satisfy GDPR deletion requests if your backups are immutable. In practice, I suppose the answer to that is probably something like “restore the backup and then run a script to clear out customers who requested data deletion.”

Leave a Comment

Combining Semantic Views in Microsoft Fabric

Chris Webb mixes a pair of views:

One of the most interesting things about Fabric semantic views (announced this week at Ignite) is the way you can combine multiple semantic views together, allowing you to reuse semantic modelling and metrics easily. This has been a long-standing ask for Power BI semantic models and while composite models were created to solve this problem, and had their uses, they never solved the problem properly – mostly because by building composite models on top of a single, physical semantic model that semantic model became a bottleneck. The documentation for semantic views talks about reuse and combining but I thought it would be good to show a simple example to help you understand what’s possible.

Click through to see how.

Leave a Comment

Multi-Level Undo and Redo in SSMS

Greg Low flips a switch:

It might (or might not) surprise you to hear that the biggest reaction world-wide to the release came when I showed the audience that the undo/redo options in the SSIS designer now actually worked.

Even better, they were multi-level undo and redo.

SQL Server Management Studio can also use the same option. By default, it only has a single-level undo and redo. It can go back quite a distance in undo but it does so one step at a time. Adding a multi-level undo and redo can really improve your editing experience. I have no idea why it’s not there on the toolbar by default. So let’s fix that !

Click through to see how.

Leave a Comment

Thoughts on Open-Sourcing SQL Server

Brent Ozar has some thoughts:

At the PASS Summit last week in Seattle, I was having a discussion with a few people who’d moved on from managing SQL Server over to working with PostgreSQL. They were talking about the advantages of open source – and there are certainly many – but it prompted me to ask, “If Microsoft open-sourced SQL Server, would that actually fix any of SQL Server’s problems?”

Read on for Brent’s take, and definitely check out Dave Wentzel’s comment. Unfortunately, I do think Dave is right about the massive challenge of open-sourcing an existing code base in a world where a variety of language models can bang away at vulnerabilities in the code and where the process for fixing bugs takes a lot longer than the process of finding bugs.

Leave a Comment

What Was New for SQL Developers in 2012

Jeff Taylor starts a retrospective:

In my session, “What’s New in SQL Server for the Developer”, I always start with a show of hands, and usually the room has everything from SQL Server 2000 all the way up to 2025, and a few folks running Azure SQL. That’s a big spread. It’s also exactly why I built the session the way I did. A lot of us are still writing T-SQL like it’s 2008, even though the engine underneath has had better tools for years.

So I’m turning my session into a series, one post per version, with the examples from my slides. Today we start where the session starts: SQL Server 2012.

I love this approach. I have a very similar talk to Jeff’s, though, for the sake of time, I have my starting point as “2016 and a couple of things that were really important in 2012.”

Leave a Comment

Group by Schema in SSMS

Jess Pomfret finds an option:

Folks, how have I missed this? I was at FabCon & SQLCon in Barcelona a few weeks ago, when I discovered (in a totally unrelated session!) that you can now group by schema in SQL Server Management Studio (SSMS). This little gem makes navigating certain databases so much easier. If you’ve ever worked in a database with hundreds of objects across many schemas, you’re going to love this.

Click through to see how.

Leave a Comment

Fuzzy String Matching now GA

Abhiman Tiwari promotes a feature:

MICROSFT isn’t MICROSOFT. MARHTA isn’t MARTHA. INV-1O08 isn’t INV-1008. To an equality check, each pair is simply different. To your business, each is a near miss worth catching.

Today, fuzzy string matching is generally available in Microsoft SQL. EDIT_DISTANCE tells you MICROSFT is one edit from MICROSOFT. JARO_WINKLER_SIMILARITY scores MARTHA and MARHTA at 96 out of 100. It all runs in T-SQL, right where your data lives, with no external libraries, models, or custom code.

As of CU11, this is now GA in SQL Server 2025.

Leave a Comment