T-SQL Tuesday #83: Resource Governor CAP_CPU_PERCENT: It just runs faster?

Welcome to T-SQL Tuesday #83 being hosted this month by Andy Mallon (blog|@AMTwo). This month’s topic is “We’re still dealing with the same problems”. If you would like to participate in this month’s blog party, go to Andy’s announcing blog post: T-SQL Tuesday #83: We’re still dealing with the same problems. For my part of this blog party, I want to talk about CAP_CPU_PERCENT for Resource Governor. This feature was added to Resource Governor in SQL Server 2012, and Books
read more

T-SQL Tuesday #81 – Migrating Databases with Dell LiteSpeed

It’s time for T-SQL Tuesday again, and this month’s host is fellow Certified Master and Data Platform MVP Jason Brimhall (Blog|@sqlrnnr). Jason has challenged us to spend some time sharpening a skill and then blog about it. For my participation, I found myself needing to get reacquainted with a third-party backup software that I had not used in many years, LiteSpeed for SQL Server by Dell. I worked with LiteSpeed extensively many years ago when I was a DBA at
read more

T-SQL Tuesday #80 – SQL Birthday Present

It’s time for another round of the global blog party we call T-SQL Tuesday. This is T-SQL Tuesday #80 and happens to fall on the hosts birthday. First order of business is to wish our host, Chris Yates (blog|@YatesSQL), a very happy birthday! The next order of business is to hand out presents. As per Chris’s request, my present is for myself and for the community at large. For my contribution to this month’s T-SQL Tuesday, I am going to
read more

Possible Infinite Recompile Was Detected for SQLHANDLE

On one of my SQL Server instances, I see a lot of these infinite recompile messages in the SQL log. Sounds bad, but they never lined up with any detected errors or failures, and I always seemed to have more important things to focus on so I let it slide. Well, today was a slow day — being the Friday before a holiday weekend — so I decided to investigate. The error messages, error #2814, all look like the below:
read more

Return Max or Min Value of a Group of Columns as a Single Column

Recently, I needed a query to identify tables that developers had create as point-in-time backups of tables that were never used again (turns out, there’s quite a lot of them in this database). They are characterized by having _bak or _ appended to the end of them. I wanted to provide a list of the tables to the development team and give them the opportunity to say that any of the tables should not be deleted. I wanted to provide,
read more

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

Attendee Questions from My #24HoP Presentation

I want to once again thank everyone who attended my 24 Hours of PASS session last week. I especially appreciate the questions that were asked. We did not have time for all questions, so I want to answer all of the questions here. Some of these were answered in the session, but not all. Q1: I see that the tables are sys.query_store_query_text, and sys.query_store_query, and not sys.dm_*, which leads to question that the query store is persistent between instance restarts,
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

What is the max/min size of a decimal data type?

Recently, I wrote a maintenance script to check every table in every database on our servers at work nightly and email a report of identity columns that are approaching the limits of their data type. The minimum and maximum values for most numerical data types are documented in Books online, but for decimal/numeric data types it is not documented and varies based on the values provided for the precision and scale. Most people know that precision is the total number
read more

My 24 Hours of PASS Session Files

I was honored to be selected to join many other great speakers in presenting for the recent 24 Hours of PASS: Evolution of the Data Platform event. My presentation was called New Paradigm for Performance Tuning in SQL Server 2016 and covers two new tools for performance tuning: Query Store and the Plan Compare tool. You can download my slide deck (in pdf form) and demo code from the page for my session on the event site. The session was
read more