Blog

Handling Divide By Zero Error

In the real world, everyone knows that if you divide by zero a wormhole will open up and swallow the universe. In SQL Server, it’s not good, but it’s not nearly as dramatic. I encountered the following error this week and thought it would make a good topic: Msg 8134, Level 16, State 1, Line … Continue reading Handling Divide By Zero Error

Do You Really Need that Order By?

I recently came across a scenario where an application process was not performing correctly on one database but was working fine on others. The process should have been completing in seconds but was taking minutes with no indication of activity. After some investigation, I found that the process was stuck waiting on a SELECT statement … Continue reading Do You Really Need that Order By?

Break the Habit of SELECT *

There are a lot actions you can take that do more harm than good in SQL Server (did somebody say shrinking your database files every day?) that don’t get the same attention. Still, SELECT * can cause headaches and we’re going to take a look at some of those headaches today. If you’re investigating a … Continue reading Break the Habit of SELECT *

A Threadpool Story

I want to talk about a setting that you should usually never touch besides verifying it’s at the Microsoft recommended value. Then, I’ll tell you about why I touched it anyway. Sometimes that red button is too shiny. Our story begins on a test server hosting a couple hundred databases. Over time, the server kept … Continue reading A Threadpool Story

AT TIME ZONE Is On Your Side

Dealing with time zones in general can be a headache. Thankfully, SQL Server 2016 included a new clause to make working with time zones more manageable. Let’s look at a couple examples: I’m in Eastern Standard Time so we’ll start here. Keep in mind that when no offset information is included, SQL Server is going … Continue reading AT TIME ZONE Is On Your Side

Loading…

Something went wrong. Please refresh the page and/or try again.


Follow My Blog

Get new content delivered directly to your inbox.