Introducing SQL Server Blocking and Deadlocks Views in the SentryOne Portal
Published On: May 6, 2020
Categories: Deadlocks, SentryOne Portal, Blocking 2
Hi, I'm Tyler Benfield, a full stack engineer here at SentryOne. For the past two years, I've been part of a team working to make SQL Sentry’s powerful database performance monitoring capabilities available from a web browser with the SentryOne Portal. SentryOne Portal makes it easy to check to make sure your monitored instances are running smoothly no matter where you are.
Today, I have some exciting new SentryOne Portal capabilities to tell you about that I think will give you the upper hand on SQL Server performance, whether you are an application developer, DBA, or, like me, somewhere in between. For years, the SentryOne SQL Sentry rich client has included features to troubleshoot and resolve blocking and deadlocks; now, those features have been fully redesigned for the SentryOne Portal. Let's dive into the details!
SQL Server blocks can occur when queries require the same resource but can't access it at the same time because it is locked. Locking and blocking is a perfectly normal part of a system that allows for concurrent processing. The problem is that, sometimes, the query holding the lock ends up holding it for too long and other queries must wait. Blocks can be complex with many queries waiting and more queries waiting on those queries. They can also be simple, involving only the blocking query and a single waiting query. Either way, database performance can suffer. Blocked queries must continue waiting on that locked resource before they can continue to run. Wouldn't it be great to have an at-a-glance view of these blocking situations with the level of detail you need to tune the problem out of existence?
The Blocking View in the SentryOne Portal
SentryOne Portal provides you with a time-driven list of blocks that have occurred in your database. You can even expand each block to view the block’s children, and its children’s children—the blocking “chain” if you will—to get a full picture of the impact the block had on performance. The Blocking view in SentryOne Portal shows you the query text for any of the queries involved in the block, with syntax highlighting to help you quickly identify and address the root cause.
Another unique feature available in the SentryOne Portal is the ability to switch between multiple versions of a blocking chain. If blocked SPIDs were added or removed, the version details will give you full insight into the dynamic blocking chain.
SQL Server deadlocks occur when waiting on a block to resolve is not an option. The simplest form is when a query needs a resource that is locked by another query, but the second query needs a resource that is locked by the first query. SQL Server solves this problem by choosing a query to kill. This leads to a best-case user experience of the application retrying the query, which still delays the results for the user, or a worst-case experience of downtime or even a system outage. No one wants that, so SentryOne gives you the tools to track them down and handle the root cause.
The Deadlocks View in the SentryOne Portal
The SentryOne Portal not only shows you the deadlocks that have occurred in your database but also gives you a unique, easy to consume, graphical representation of them. Eliminating duplication and unrelated noise is key to helping you efficiently solve the problem. SentryOne does this for you in the deadlock display. You can hover over any process or resource, or dependency between them, to see only the items directly associated with that node. All the detailed information about a process or resource is easily accessible by clicking the node. Panning and zooming allow you to navigate the diagram for larger deadlocks with ease. We have even more improvements to the diagram coming soon that I think you will enjoy using as much as I enjoyed working on them, so stay tuned!
I sincerely hope you enjoy the new blocking and deadlocks functionality available in the SentryOne Portal. It makes my day to know that our work improves the lives of data professionals who have the same challenges, needs, and expectations as me. I would love to hear your feedback on SQL Sentry, so please leave any comments or questions you might have. Until next time!
Tyler is a Senior Software Development Engineer at SentryOne. He is a full-stack engineer with experience building rich frontends, robust Web APIs, and reliable databases. His current areas of expertise are React and GraphQL, having worked with them since they were released. At SentryOne, Tyler has been focused on expanding the accessibility of SQL Server performance data with the SentryOne Portal.