Press "Enter" to skip to content

Author: Kevin Feasel

Changing the Border Color of SSMS Grid Results

Greg Low lightens things up a bit:

As soon as I started working with a recent version of SSMS, I realized that I didn’t like how heavy the grid lines were in the output:

I really wanted the data to be the focus, not the lines. They seemed much darker than on the previous versions. Note that this is a personal preference. I can imagine some people preferring them as they now are. Fortunately, though, you can now change the color of the lines. 

Click through to see how.

Leave a Comment

Running Data API Builder in an Azure Container Instance

Jess Pomfret deploys an API:

This is post two in my series about the Data API Builder (dab), the first post, Data API Builder, covers what dab is and how to test it locally against SQL Server in running in a container. This was great for testing, but now we want to start to productionise this, and the first step is to get it running somewhere other than my laptop.

There are several deployment options available, I recommend you review the Microsoft docs here: Deployment guidance for Data API builder.

ACI wouldn’t necessarily be my first choice for, well, much of anything. However, it is cheap and easy, so it has that going for it.

Leave a Comment

Calculating Exponential Moving Average in T-SQL

Rick Dobson watches the flow:

Exponential moving averages (emas) are a powerful means of detecting changes in time series data. However, if you are new to this task, you may be wondering how to choose from conflicting advice about how to calculate emas. This tip reviews several of the most popular methods for calculating moving averages. Additionally, this tip presents T-SQL code samples with common table expressions and stored procedures for generating emas from an underlying time series dataset.

“Emas don’t just track trends—they reveal momentum in motion.” That’s why they’re favored when recent values matter most—and why this tip focuses on helping you calculate them with precision.

Read on for the formula and a couple of lengthy scripts to generate it.

Leave a Comment

pg_statviz 0.8 Released

Jimmy Angelakos announces a new version of the pg_statviz extension:

I’m happy to announce release 0.8 of pg_statviz, the minimalist extension and utility pair for time series analysis and visualization of PostgreSQL internal statistics.

This release adds support for PostgreSQL 18, adapting to significant catalog view changes introduced in this release:

Read on to see what’s new. pg_statviz is a lightweight extension for observing internal PostgreSQL performance data, such as wait stats and I/O time.

Leave a Comment

Exporting Non-Downloadable Power BI Reports

Koen Verbeeck downloads a report:

Yes, you’re reading that right, we’re going to download a report that cannot be downloaded. Well, it cannot be downloaded from the user interface, that is. Suppose you have a report in a Power BI workspace (Pro, PPU, Fabric, it shouldn’t matter), and they’ve lost the original Power BI Desktop file. You try to download the report, but for some reason the GUI doesn’t let you:

Read on for reasons you might not be able to download the report, as well as what you can do if you do have access to the report but the download option is unavailable.

Leave a Comment

Running SQL against Fabric Warehouses via Python

Jared Westover builds a loop:

In a previous article, I ran a SQL script against a Fabric Warehouse 100 times without needing to click ‘Execute’ each time. A WHILE loop could work, but Query Insights treats it as a single execution. While using GO was an option, I wanted a different approach because I’m always trying to expand my skill set. I need a scalable way to run scripts for performance testing.

This is a pretty simple database connection and script execution. For the most part, it would work just fine for any other SQL Server family member, just with a somewhat different connection string depending on the product.

Leave a Comment

Comparing Sets of Data in T-SQL

Louis Davidson figured out which of these was not like the others, which of these just didn’t belong:

There are many occasions when we want to see the differences between two sets of data. Sometimes a whole table, a subset of a table, or even the results from a couple of queries, like in a unit test.

Maybe you want to see that two sets are exactly the same, for example domain table in DEV, PROD, or maybe even from source control. You might you have a orders table and an orders_history table and you want to see the overlap/changes over a given period of time, like for example, to clean out any useless history.

No matter what the reason, there is a query pattern that will work for you. In this blog I will demonstrate several of these techniques and why you might want to use them in different places.

Click through for those techniques. I am particularly fond of INTERSECT/EXCEPT because of how it handles missing data and typically performs quite well.

Leave a Comment

Deleting Default Semantic Models in Microsoft Fabric

Pradeep Srikakolapu says good riddance:

In our earlier announcement, we shared that newly created data warehouses, lakehouses and other items in Microsoft Fabric would no longer automatically generate default semantic models. This change allows customers to have more control over their modeling experience and to explicitly choose when and how to create semantic models.

Starting November 20, 2025, Power BI *default* semantic models are disconnected from their item and become independent semantic models.

Click through for an overview of those changes and how you can get rid of the default models you may still have hanging around.

Leave a Comment

Exploiting Database as a Service SQL Server

Fabiano Amorim has a post-mortem of a nasty privilege escalation bug in SQL Server:

This article explores a serious flaw in this security model – a SQL Injection vulnerability in sys.sp_help_spatial_geography_histogram that allowed a standard user on managed SQL Server instances (AWS, GCP, Alibaba, Azure) to completely bypass these restrictions, gain access to privileged user data, and decrypt the source code of internal management stored procedures.

It was fixed in SQL Server 2022 CU20 (KB5063814), but this article explains how the exploit worked and the process of eliminating it.

Click through for the details and make sure your on-premises SQL Server instances are patched.

Leave a Comment

Windows Clustering for the DBA

Sandra Delany is perilously close to running afoul of Betteridge’s Law of Headlines:

Should a SQL Server DBA know how a Windows cluster works, and or how to create a Windows cluster, or troubleshoot a cluster? Or should we, as DBAs, stay in our lane? In some organizations, a line is drawn between what a DBA can and can’t do and the System Administrator (SA) has the Infrastructure roles and responsibilities. This is fine, but that doesn’t mean a DBA shouldn’t know how to troubleshoot a FCI (Failover Cluster Instance) or AG (Availability Group) issue after an unplanned cluster-level failover.  (Yes – you can create an AG without a cluster, but that will not be taken into consideration here.)

Read on for some quick tips to get ramped up on what is available in a Failover Cluster Instance.

Leave a Comment