Press "Enter" to skip to content

Curated SQL Posts

Personalizing the Linux Command Line

Thomas Williams wraps up a series:

For an even better prompt, I’m a fan of “Oh My Posh” https://ohmyposh.dev/. Once installed, my prompt looks like below, shown in a Python Git repository directory – with the Oh My Posh prompt displaying my username, the directory name, the Git branch and files needing commit, the current Python version (because I’m in a Python project directory with uv), and lastly the time it took to complete the previous command and whether the command was successful:

Click through for the remainder of Thomas’s advice. My main thing about personalizing the Linux command line is just making sure I get that .bashrc file everywhere I can, as it’s neat to have a bunch of useful commands and shortcuts, but then you get dumped on a new shell without your .bashrc and you’re struggling even harder.

Leave a Comment

Capacity Overage in Microsoft Fabric

Pankaj Arora has a new ‘give us money’ lever:

Capacity overage, is a new opt‑in capability in Microsoft Fabric designed to help organizations keep their workloads running—even during unexpected compute spikes. Now available in preview, this feature allows for automatic billing for excess capacity usage, based on limits you set, instead of throttling operations, ensuring smoother experiences when workloads exceed the limits of your purchased capacity.

I will say that I think it’s reasonable to have the two options of throttling (you went over by 30%, so for a stretch of time you’ll be capped until you get back under the limit) or simply paying. The controversy around this was mostly in the fact that, if you shut off and restart your Fabric capacity, you’d automatically be charged for the overages you created. To that end, providing more options on how to work off that overage debt is useful.

Leave a Comment

The Importance of the Transaction Log in SQL Server

Deb Melkin lays out the case:

Lately, I’ve been feeling like we’re not paying as much attention to transaction logs as we should. In fact, I’ve been saying there needs to be a flashing neon sign that says “Transaction Logs are more important than ever.” I thought I’d take a minute and explain why.

Click through for some important functionality that makes heavy use of the transaction log, Deb also has a call to action on how to keep them going.

Leave a Comment

Reviewing the Performance Monitoring Lite Dashboard

Erik Darling has another tutorial video:

In this video, I delve into the exciting world of SQL Server monitoring tools, focusing on the Lite version of my free open-source tool, which is a lightweight and secure solution for monitoring performance across multiple servers. I walk through how to download and set up the Lite edition, highlighting its unique features such as no server-side installations or databases, making it an ideal choice for environments like Azure SQL Database where agent jobs are used. The video covers the tool’s 20 collectors that run with minimal permissions, ensuring data collection is both efficient and secure. I also showcase the various tabs within the dashboard, including weight [sic] stats, query trends, CPU and memory usage graphs, blocking information, and performance monitor counters, all designed to provide a comprehensive view of SQL Server health without any heavy lifting on the server side.

I think my preference is still for the Full version (especially given that the price tag on both versions is zero) in most situations, but the Lite version does cover some neat bits of functionality.

Leave a Comment

Generating Excel Reports via Fabric Dataflows Gen2

Chris Webb builds a report:

So many cool Fabric features get announced at Fabcon that it’s easy to miss some of them. The fact that you can now not only generate Excel files from Fabric Dataflows Gen2, but that you have so much control over the format that you can use this feature to build simple reports rather than plain old data dumps, is a great example: it was only mentioned halfway through this blog post on new stuff in Dataflows Gen2 Nonethless it was the Fabcon feature announcement that got me most excited. This is because it shows how Fabric Dataflows Gen2 have gone beyond being just a way to bring data into Fabric and are now a proper self-service ETL tool where you can extract data from a lot of different sources, transform it using Power Query, and load it to a variety of destinations both inside Fabric and outside it (such as CSV files, Snowflake and yes, Excel).

Click through for an example.

Leave a Comment

Calculating Net Present Value and Internal Rate of Return in T-SQL

Sebastiao Pereira is back with more calculations:

Many organizations store cash-flow data inside SQL Server and decision-makers often need metrics like Net Present Value (NPV) and Internal Rate of Return (IRR) to evaluate those cash flows. Is it possible to calculate NPV and IIR values in SQL Server without the use of external tools?

These are quite easy to pull off in Excel and a bit more complex in T-SQL. Though with Net Present Value, in particular, I’m pretty sure I could rewrite it not to use the cursor.

Leave a Comment

Finding a Burrito in Ireland

Andrew Pruski has my attention and my interest:

A while back I posted about a couple of side projects that I’ve been working on when I get the chance. One of those was the Burrito Bot…a bot to make burrito recommendations in Ireland 🙂

Over the last 18 months or so I’ve reworked this project to utilise the new vector search functionality in SQL Server 2025…so now it looks like this: –

Andrew also owns the burrito-bot.com domain, as he showed it off live during his presentation at Data Saturdays Chicago. Unfortunately, it seems the service is not up at the moment, so your best bet might be to take the code from the Burrito Bot GitHub repo and build your own.

Leave a Comment

User-Defined Types in PostgreSQL

Grant Fritchey dives into functionality:

I’m sure I’m not alone when I say, sometimes I get sidetracked. In this particular instance, I hadn’t intended to start learning about User-Defined Types (UDT) in PostgreSQL – I just wanted to test a behavior that involved creating a UDT. But, once I started reading, I was hooked. I mean, four distinct UDTs with different behaviors? That’s pretty cool. Let’s get into it.

Read on to learn more about why there are so many user-defined types in Postgres. Looking at the list, I do really like what they have available. You can, of course, replicate the functionality otherwise (e.g., check constraints on a regular column for DOMAIN, foreign key link to a lookup table for ENUM), but it’s nice to have those types right there for clarity of design and so you don’t accidentally forget to apply an appropriate constraint.

Leave a Comment

Tips for tempdb Resource Governance

Rebecca Lewis shares a few tips:

Someone runs a massive SELECT INTO #temp, tempdb fills the drive, and the entire instance freezes up dead. You get paged at 2 AM, kill the session, shrink the files, and spend the next day writing a monitoring script that you hope will catch it next time.

SQL Server 2025 finally lets you stay ahead of this. The Resource Governor can now cap how much tempdb space a workload is allowed to consume. Exceed the limit and SQL Server kills the query — not the instance. How cool is that? It’s like proactive DBA-ing without the DBA.

Click through for a primer on how to enable Resource Governor, how to alter the default workload group to set a cap on tempdb disk space utilization, and some things to keep in mind if you do use this feature of SQL Server 2025.

Leave a Comment

Protecting the SSMS Server List

Jens Vestergaard provides an update:

Twelve years ago 🤯 I wrote a quick post about never losing your server list in SSMS again. The short version was: copy one file, stay sane. The file was called SqlStudio.bin, and the trick still works today if you are on an old enough version.

But if you are running SSMS 19, 20, 21 or 22 on Windows 11, the file is gone. The settings have moved, and the format has changed. The principle is the same, but the file you need to grab is different.

Here is the updated version for 2026.

Click through to see what changed starting in SSMS 19, as well as how to manage that file.

Leave a Comment