O'Reilly logo

Microsoft SQL Server 2012 Performance Tuning Cookbook by Bihag Thaker, Ritesh Shah

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16. Dealing with Locking, Blocking, and Deadlocking

In this chapter we will cover:

  • Determining long-running transactions
  • Detecting blocked and blocking queries
  • Detecting deadlocks with SQL Server Profiler
  • Detecting deadlocks with Trace Flag 1204

Introduction

Transactions are an integral part of any OLTP database system. They manage data consistency and data concurrency issues, to make sure that data always remains in a valid state in the database, when multiple sources read or update the same data at the same time. In SQL Server, this is achieved through a locking mechanism that SQL Server applies while reading and writing data from and to the database. The lock manager in SQL Server is responsible for applying this locking mechanism. SQL Server ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required