Press "Enter" to skip to content

Curated SQL Posts

Using Screencast Mode in VSCode

Mike Robbins shares some good advice:

If you’ve ever watched a live demo where the presenter says “I’ll just run this” and code appears out of nowhere, you know how easy it is to lose the audience. They can’t see which keys you pressed, which command you ran, or where you clicked. Visual Studio Code (VS Code) has a built-in feature that solves this problem: screencast mode.

I learned about screencast mode from Steven Judd while we were teaching PowerShell together in the OnRamp program.

It’s easy enough to turn on before demos and off after the presentation. Between that and Ctrl +/- to zoom in and out, Visual Studio Code is very convenient for demonstrations.

Leave a Comment

SQL Server 2017 Has One Year of Support Remaining

Brent Ozar provides a reminder:

Even if you can knock out one of these per month on every 2017 & prior instance that you have, you’re still gonna be banging up against the October 12, 2027 deadline.

It’s not like your servers will magically stop working on that date – but if your company’s insurance or compliance rules say you’re not allowed to run out-of-date software, then it might be your butt on the line for not getting onto a supported version. (And if you’re subject to that, and you’re still running on SQL Server 2016, I’d be curious to hear in the comments how your experience went trying to purchase 2016 Extended Security Updates (ESU) from Microsoft.)

Brent has a list, and if you have any 2017 instances kicking, it’d be a good idea to get started on these.

Leave a Comment

Stretching an Availability Group to Azure

Jordan Boich begins a series:

Every IT person has lived this outage: the app is down, the database team says the database is fine, the network team says the network is fine, and infrastructure team says the DCs are fine. Everyone is right, and the app is still down. The problem is in the seam between us. My goal is to bridge that gap. Not only for myself, but to show others out there that from the DBA’s chair, the network, infrastructure, and the database don’t have to be such completely separate knowledge domains where one is a black box to the other.

To blame the network, you must understand the network.

Okay, that’s not true at all. But still, it’s a good idea to know this stuff.

Leave a Comment

UNC Paths on SQL Server Agent PowerShell Jobs

Dualcore DBA troubleshoots an issue:

It’s a classic backup job – run the backup using T-SQL and then upon success, purge the backup directory of backups that are older than a given number of days.

My backup job step backs up to a UNC path – \\192.168.2.174\Backups and then the PowerShell step will purge any backups older than 7 days.

Easy peasy…until it isn’t. Click through for the error and the solution.

Leave a Comment

Architecting a Reporting Solution on a Fabric F2

Gilbert Quevauvilliers builds it on the cheap:

In this blog post, I want to show you how I architected a customer reporting solution using a single Microsoft Fabric F2 capacity and Power BI Embedded through Entelexos.

The two core subscriptions total USD $362 per month. That covers the reserved Fabric capacity and the Entelexos Basic subscription.

The reason I wanted to share this is to show that it is possible to engineer a cost-effective solution for smaller customers.

Click through to see how.

Leave a Comment

Worker Thread Exhaustion and sp_invoke_external_rest_endpoint

Louis Tochon runs out of worker threads:

With SQL Server 2025, Microsoft lets the database engine call an AI model by itself. sp_invoke_external_rest_endpoint sends an HTTPS request straight from T-SQL, to Azure OpenAI or to any other REST service, so an embedding or a completion no longer needs application code in between.

But what happens under heavy pressure, when hundreds of sessions make that call at the same moment and the model takes its time to answer? I ran this scenario on SQL Server 2025 and on Azure SQL Database, with the same procedure and the same load script. The two platforms do not react the same way at all.

Click through for three tests, covering SQL Server 2025 with and without Resource Governor, as well as Azure SQL Database.

Leave a Comment

Securing Temporary Objects, Metadata Visibility, and Audit Assurance in SQL Server

Fabiano Amorim hits three topics:

Over the course of this series, I’ve challenged the common assumption that a SQL Server environment is safe simply because it’s patched, firewalled, and configured according to familiar defaults.

I’ve proven that this is not quite true, because real security is not a checkbox. It requires a verification mindset, especially in areas where SQL Server intentionally provides powerful operational features for DBAs, developers, monitoring tools, and application frameworks. 

In this guide, I’ll focus on three features that are easy to underestimate because they look like normal SQL Server behavior. They are global temporary objects, Dynamic Management Views (DMVs), and audit coverage – each a useful feature in their own right.

The other thing they all have in common? They can each become part of an attack chain if granted too broadly, used inside privileged workflows, or trusted without validation. 

Click through for Fabiano’s guidance.

Leave a Comment

The Value of Apache Ossie

Victoria Holt shares some information:

Apache Ossie (incubating) is an industry-wide specification effort to standardize how we exchange semantic metadata across analytics, AI and BI platforms, providing a vendor neutral, single source of truth for semantic data. Ossie was previously known as Open Semantic Interchange (OSI). A semantic model is simply a shared definition of business concepts, metrics and relationships that helps people, reports and AI systems interpret data consistently.

Click through to learn more about Ossie’s intent. There’s still a long way to go, but with all(?) of the major players on board, hopefully we’ll get some good outcomes.

Leave a Comment

The TABLESAMPLE Process in Postgres

Radim Marek provides an explanation:

At least Postgres avoids flushing its own cache by reading large tables through a small ring buffer. Nevertheless the disk still perform full read. On a primary server handling production traffic is shared with everything else. When all you need is exploratory confirmation “roughly how many” or “are there any representative samples” reading the whole terabyte is too expensive.

SQL Standard comes with TABLESAMPLE to help with that. It goes in the FROM clause right after the table name, and the rest of the query runs against the subset of pages it picks.

Read on to learn more.

Leave a Comment