Press "Enter" to skip to content

Category: Error Handling

SQL Server and the Halloween Problem

Dualcore DBA takes a look at a historical problem:

The Halloween Problem gets its name from the day it was discovered – 31st October (some reports differ between 1975 and 1976). On this day, Donald Chamberlin, Patricia Selinger, and Morton M. Astrahan were working on the System R database project in an IBM lab and wrote a SQL query which updated a database, giving each staff member who earned less than $25,000 a 10% pay rise. The query completed, but every staff member then had a salary of at least $25,000 – this was not the expected output of the query.

They had inadvertently found a flaw in how the update was being executed – some affected records were updated more than once, until they no longer matched the filter criteria.

Click through to see how most data platforms, including SQL Server, resolve this issue.

Leave a Comment

Lessons Learned from Troubleshooting with LLMs

Grant Fritchey spends a weekend:

Grant Fritchey walks through a real troubleshooting saga – using Wine, a shim DLL, a misconfigured registry entry, and a lot of trial and error – to get a BridgeCom Maverick radio’s Windows CPS running on Linux Mint.

Along the way, repeated dead ends revealed a pattern: AI tools stay locked onto whatever direction you last pointed them, and it’s up to you to redirect, request alternatives, and demand measurement over guesswork.

In this article, Grant shares everything he learned from the experience, including 8 key takeaways to help you avoid similar trouble when using AI in the future.

Grant takes us through the story and shares eight tips for better troubleshooting along the way. Oh, and Wine is notoriously finicky, so I can totally get why it’d take a while to sort out the issues Grant had.

Leave a Comment

XACT_ABORT vs TRY_CATCH

Jared Westover explains the difference:

After creating a SQL script and a pull request, a savvy developer left a comment on the PR because they were confused about why I was using both XACT_ABORT and TRY…CATCH. They thought that including both in one script was redundant. That got me thinking: is it true that setting XACT_ABORT ON makes TRY…CATCH redundant?

The most interesting part of this post is the cases in which you would use both in the same script.

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

Comparing xp_readerrorlog and sp_readerrorlog

Steve Jones looks at a pair of procedures:


I was creating a question on sp_readerrorlog and realized that this procedure is different from the one it wraps: xp_readerrorlog. This post digs into a few differences.

Click through for the answer, though Steve’s reference of sp_readerrorlog being “new” is, I think, not quite right. I’m pretty sure that both sp_readerrorlog and xp_readerrorlog were introduced in SQL Server 2005. I did dig up a Rodney Landrum article from April of 2010 talking about sp_readerrorlog, so it was at least in SQL Server 2008.

Comments closed

Certificate-Based Authentication and Availability Groups

Jordan Boich shares a story:

A few months after a clean migration, replication between the nodes in the global primary AG in a Distributed Availability Group (DAG) just stopped. There were no new deployments, config changes, or specific warning signs prior to this. Windows patching had occurred, the servers rebooted like they usually would, and the AG never came back together.

I know for myself, one of the most frustrating phrases that gives me the sense of impending doom is “nothing changed, why is this breaking?!”. That’s exactly what was going on here.

Read on to see how an innocent-looking configuration setting can cause issues down the road.

Comments closed

T-SQL Tuesday 202 Round-Up

Marlon Ribunal summarizes a group of outages:

I expected stories about bad queries, failed deployments, storage problems, or maybe a database that decided to have a very bad day. What I got was much more interesting.

There were stories about ransomware, corrupted databases, deleted storage, power and cooling failures, an identity column reaching its limit, and even a floppy disk. A server Meltdown too.

Some of these outages lasted hours. Others lasted days or even weeks.

Click through for the list.

Comments closed

Troubleshooting a Fabric Copy Job Connection Closure

Reitse Eskens debugs an issue:

This is a very common setup that usually works just fine.

Yet, I ran into something weird that I wanted to share with you. When I set up this copy job, I could reach the database, preview the data, and create the job. No issues. But when I started the actual data transfer, the job ran for two minutes and thirteen to sixteen seconds before throwing an error. On every table.

Click through for the error message, the cause of the error, and how to solve it.

Comments closed

A Pernicious Floppy Disk

Deb Melkin deals with disaster:

One morning, the help desk support person came over and said this one client was having performance issues. This was one of the cases where we would just reboot. It was early and there would be plenty of time for everything to be back up and running before the system was needed. So I gave the go ahead to reboot the server.

This did not go well. Read on for the rest of the story.

Comments closed

Fixing a Problem from the Naval Yard

Andy Levy tells us a story:

A buddy of mine invited me to take a road trip and join him in Philadelphia, PA to take a tour of the USS New Jersey while she was in drydock for its required museum ship maintenance. Quite possibly a once in a lifetime opportunity – we wouldn’t be touring the inside of the ship, we would be walking around underneath her, on the floor of the drydock. I hit the road on Friday, and picked him up at the airport. We got dinner, unwound from our respective travels, and planned out the following day.

Click through to see what happened next.

Comments closed