Press "Enter" to skip to content

Curated SQL Posts

Row Counts and Execution Time for Active SQL Server Queries

Kendra Little wants to know what’s happening right now with this query:

I frequently need to see rowcounts and execution time for queries while they’re running. Maybe I’m troubleshooting a slow query that’s still executing, or I want to understand which operators are causing the slowdown before the query completes.

Last week at the PASS Summit I learned some little nuances about how this works that I’d missed.

Click through to learn what Kendra learned (and now what I learned).

Leave a Comment

Extracting SSMS 21 and 22 Saved Connection Data

Vlad Drumea wants to keep some connections:

In this post I demo a PowerShell script that can be used to extract and decrypt SSMS 21 and 22 saved connection information.

This script builds on the one for importing saved connections from SSMS 21 to SSMS 22.
Instead of importing, it looks for any SSMS 21 and 22 related config folders, extracts the relevant connection data, decrypts it and saves it in clear text.

Click through for a link to the script, as well as an explanation of what is happening.

Leave a Comment

Data Visualization and Microsoft Fabric Notebooks

Meagan Longoria thinks about notebooks:

Lots of people have created Power BI reports, using interactive data visualizations to explore and communicate data. When Power BI was first created, it was used in situations that weren’t ideal because that was all we had as far as cloud-based tools in the Microsoft data stack. Now, in addition to interactive reports, we have paginated reports and notebooks. In this post, I’ll discuss when notebooks might be an appropriate visualization tool.

Click through for Meagan’s thoughts.

Leave a Comment

Power BI Build Permissions

Chris Webb explains what the Build permission actually does:

If there is sensitive data in your Power BI semantic model that you don’t want some users to see then you need to use row-level security or object-level security to control access to that data. You’re an experienced Power BI developer – you know that, right? But what about Build permissions? If an end-user only has access to a report you’ve built and doesn’t have Build permissions on the underlying semantic model, and if there’s no other security on the semantic model, can they access data in the semantic model that isn’t visible in the report? The answer is potentially yes: you can’t rely on Build permissions for security.

I’ve found that the best method of security is never deploying products to begin with. Also, never using a computer.

Leave a Comment

Column-Level Encryption in SQL Server

Greg Low provides a primer:

Way back in SQL Server 2005, Microsoft introduced an amazing array of technologies. I suspect that many SQL Server professionals aren’t aware of just how many technologies were introduced in that release. It’s not surprising that professionals are still learning about a number of these technologies, even 20 years later. In particular, questions regarding certificates, keys, and column-based encryption still draw blank responses from most SQL Server professionals.

What’s interesting is that, as far as technologies like Always Encrypted have taken us, one of the first things to get support in new twists on SQL Server (e.g., Synapse, Fabric) is column-level security.

Leave a Comment

Tips for Building a Data Warehouse

James Serra gets back to foundations:

I had a great question asked of me the other day and thought I would turn the answer into a blog post. The question is “I’m an experienced DBA in SQL Server/SQL DB, and my company is looking to build their first data warehouse using Microsoft Fabric. What are the best resources to learn how to do your first data warehouse project?”. So, below are my favorite books, videos, blogs, and learning modules to help answer that question:

Click through for James’s recommendations. I strongly agree with his advice to start with Ralph Kimball’s The Data Warehouse Toolkit, and frankly, I think a lot of James’s advice here is sound. The person asking focuses on Fabric, and there are plenty of Fabric-specific things to learn, but at the end of the day, modern data warehouses are still data warehouses.

Leave a Comment

Functions and WHERE Clauses

Brent Ozar digs into some of the nuance:

SQL Server brought back 1856 of an estimated 1856 rows. So far, so good. But what happens when we start running functions on the parameter we’re searching for, like if it’s a parameter that we need to clean up. How will this affect our estimated number of rows:

Your knee-jerk reaction is probably to say, “FUNCTIONS BAD!” especially given that this is a case-insensitive database. But let’s test that hypothesis across time, across different database compatibility levels:

Brent give some of the nuance behind this. Which, in fairness, aligns with what some of the best performance tuning practitioners have frequently stated. But in contra-fairness, Brent shows how that advice should also change depending on the version of SQL Server, and how the first few versions of SQL Server after the no-longer-new cardinality estimator behaved radically differently from pre-2014 or post-2019.

Leave a Comment

Accessing a Former Employee’s Power BI Workspace

Gilbert Quevauvilliers says it’s MY workspace now:

One of the common challenges I’ve seen in organizations is when a team member leaves and their Power BI reports are stored in their personal My Workspace. These reports often contain valuable datasets and dashboards that are still in use or need to be maintained. So, how do you access and recover these reports?

In this blog post, I’ll walk you through the steps to access a former employee’s My Workspace, assign it to a supported capacity, and download the reports using Fabric Studio.

Read on for the instructions, and be sure to do the “Look at me. I am the captain now” meme when it works.

Leave a Comment

Invoking REST API Endpoints in SQL Server 2025

Hristo Hristov makes a call:

One highly anticipated new feature in SQL Server 2025 is the ability to call an external REST API endpoint from the database server itself. This new feature opens the door to new data integration scenarios and delivers on the promise to “bring AI closer to data.” What are the steps to follow if you want to use this new feature?

I expect to see two things from this. First, some percentage of developers will abuse it and cause performance problems in the database. Second, some percentage of database administrators will panic about this and try to prevent its use even when it makes sense.

But hey, at least this time, they didn’t use the term “unsafe” to describe something DBAs don’t understand and thus cause a widescale panic.

Leave a Comment

Eventhouse Endpoint for Fabric Data Warehouse

Tzvia Gitlin Troyna announces a new feature:

The new Eventhouse Endpoint for Fabric Data Warehouse extends this same architecture to structured data sources, allowing users to:

  • Query Fabric Data Warehouse tables in real-time using KQL.
  • Leverage schema mirroring for warehouse tables.
  • Unify analytics across Lakehouse and Fabric Data Warehouse without duplicating data.

Even if I don’t expect many data platform practitioners to use KQL and even though I’m morally opposed to the Fabric Data Warehouse (short version: Lakehouses and Warehouses in Fabric should be the same thing, not two separate things), I’d still consider this a step forward. It does provide a new integration point between two services that have been annoyingly isolated.

Leave a Comment