Stack Dumps in SQL Server (Dear SQL DBA Episode 33)

Learn what a Stack Dump is in SQL Server and watch a demo where I cause a stack dump against a test SQL Server instance under load. Learn how to find information about stack dumps on your SQL Server, and how to escalate them when required.

Watch this week’s 21 minute video, and subscribe to my YouTube channel if you’d like to see more. You can also get future episodes in the audio podcast if you like to listen on the go. Links from this episode and scripts for reproducing the stack dump are at the bottom of the post.

Update, June 2017: We’re getting a new feature where you can analyze stack dumps in the cloud. Read about it here.

Note: I joke around for a while at the beginning of the video about how I once received training at Microsoft on “how to take a dump”. The technical bit starts at 7:15, in case you’re in a rush.

Read Kalen Delaney’s whitepaper on Hekaton

I’m not trying to say that using In-Memory OLTP is going to cause stack dumps… although now that I think about it, it doesn’t hurt to be prepared! At the beginning of this episode I mention that I’m excited to get to attend Kalen Delaney’s pre-conference session in Lisbon on Hekaton. If you’re jealous, you’d probably enjoy reading her whitepaper on In-Memory OLTP in SQL Server 2016 (pdf download). You can also get a free PDF of Kalen’s book on In-Memory OLTP (SQL Server 2014) from Redgate.

Meet my example stack dump

In the video, I show an example of a stack dump caused by running DBCC PAGE with format style 3 against a table with a filtered index in SQL Server 2014.

It looks like this bug is fixed in SQL Server 2016, at least by SP1.

Sample code to reproduce this against the AdventureWorks2012 database (which I had restored to SQL Server 2014) is in my gist here.

Microsoft support links

In the episode this week I show a screenshot of Microsoft business support options and prices. Here’s the link to the page where I grabbed that.

Do you have a Dear SQL DBA question?

Ask away!

Trackbacks/Pingbacks

  1. Context in perspective 6: Taking Sessions to Task – SQL on ice - March 29, 2017

    […] few weeks ago, Kendra Little did a very entertaining Dear SQL DBA episode about stack dumps. That gave me a light bulb moment when I tied the preamble of her stack dump […]

  2. SQL Server doubly linked lists revisited – SQL on ice - April 4, 2017

    […] my previous post, I referenced one of Kendra Little’s Dear SQL DBA episodes, where she demonstrates a stack dump. The exception that led to the stack dump in question […]

Leave a Reply