AG Worker Thread Blocked by Log Backup

We have an internal monitoring query that checks for system threads that are blocked. Recently, we received an alert email stating that system thread with session ID 44 had been blocked for at least 599 seconds (10 minutes, basically). This was in the middle of the night, and I looked into the issue once the work day began. Our 3rd party monitoring solution collects blocking information, but not for system threads. There was no additional information available for this blocking
read more

What has 2 Thumbs and Deleted a LUN with the Log File of a Production DB on it?

That’s right, I did it. I was deleting unused LUNs and the focus somehow jumped from the LUNs for the one database onto a LUN for another database. I blame an errant mouse-click. As soon as I deleted the LUN, I realized the name was wrong. The LUN held the log file for a production database. Fortunately for me, the database was in an Availability Group so after recreating the LUN and attaching it, I restored the database from the
read more

Corrupt Temporary Statistics in SQL Server 2014 Readable Replica

Earlier this week, the Database Strategy Team at my company was contacted about queries that were failing on one specific table. The same query on TableX and TableZ were successful, but it failed on TableY (not the real table names, but it is data partitioned into separate tables where the names are serialized in that fashion). They also reported that it did not fail when they ran the query directly in SQL Server Management Studio (SSMS). While I was just
read more

Error Creating Remote Distributor When Creating a Local Distributor

Recently, I was working on a Peer-to-peer replication automation project. When I switched from my local test servers to some lab servers to test my scripts, I ran into some issues. The thing that confused me at first was that it was complaining about a missing remote login for the replication linked server that gets created when you run sp_adddistributor. The reason the error was confusing at first is because I was creating local distributors (the best practice for peer-to-peer
read more

Performance Counters: Why It Depends

When you’re working through some vague performance issues (e.g., “SQL Server seems slow today”), one of the common things to do is to collect some performance counters. If you are collecting performance counters for the first time on the server, you don’t have anything to compare them against. This usually leads to searching the web for resources that will tell you what numbers the counters should be. And sadly, it quite often ends with either misleading advice or with a
read more

Why is Your SQL Server Slow? All-for-one and One-for-all

I have one more thing I want to talk about regarding the conversation I had recently with my friends and former colleagues at Idera about the things that slow down SQL Server. Another “quick performance wins” you can take advantage of is segregating the types of files SQL Server uses. If you install SQL Server by just clicking NEXT until you get to the end, you end up with everything running on the same drive. Different files have different types
read more

Why is Your SQL Server Slow? Here's a Hint

I was talking recently with my friends and former colleagues at Idera about the things that slow down SQL Server. Specifically, the discussion was about things that people could change without a lot of trouble to make their SQL Server run faster. I like to use the phrase “quick performance wins” for these easy-to-fix issues that can generate a considerable performance boost. This conversation led to a whitepaper on 5 things that are making your SQL Servers slow. Watch Idera’s
read more

Performance Tuning Pre-con and More at SQLSaturday 277 RVA

Join me for 2 days of fun and education at SQL Saturday #277 in Richmond, VA on March 21 and 22, 2014. I will be delivering an all-day pre-con session, Performance Tuning and Troubleshooting Like a Pro, on Friday, March 21. The session is only $99 if you sign up before February 20. On February 20th, the price goes up to $125. Title: Performance Tuning and Troubleshooting Like a Pro Level: All levels Description: Do you wish you could turbo
read more

T-SQL Tuesday #49: Wait For It Roundup

A huge round of applause and my thanks to all of the participants and spectators for this month’s edition of T-SQL Tuesday. I hope I didn’t keep you waiting too long for the roundup. <rimshot> Let’s take a look at this month’s participating blog posts: Fellow Certified Master (MCM) Rob Farley (blog|@rob_farley) led off with Waiting, waiting…. Rob talks about what causes SQL Server (and computers in general) to be slow and how to baseline SQL Server waits to detect
read more

T-SQL Tuesday #49: My Go-To Query For Waiting Tasks

I’m not just hosting T-SQL Tuesday, I’m a customer as well. Err, I mean participant. Topic for this month’s T-SQL Tuesday, hosted by yours truly, is … wait for it … Waits and Queues. For my donation to this little blog party, I’m contributing my favorite go-to query for waiting tasks. Do you ever get complaints that SQL Server is “slow”? Yeah, that’s a helpful report, right? when I get those kinds of reports, I like to take a quick
read more