You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This article discusses deadlocks in the [!INCLUDE [ssdenoversion-md](../includes/ssdenoversion-md.md)] in depth. Deadlocks are caused by competing, concurrent locks in the database, often in multi-step transactions. For more on transaction locking, see [Transaction locking and row versioning guide](sql-server-transaction-locking-and-row-versioning-guide.md).
23
23
24
-
For more specific information on identification and prevention of deadlocks in Azure SQL Database, see [Analyze and prevent deadlocks in Azure SQL Database](/azure/azure-sql/database/analyze-prevent-deadlocks).
24
+
For more specific information on identification and prevention of deadlocks in Azure SQL Database, see [Analyze and prevent deadlocks in Azure SQL Database and Fabric SQL database](/azure/azure-sql/database/analyze-prevent-deadlocks).
25
25
26
26
<aid="deadlocks"></a>
27
27
@@ -133,7 +133,7 @@ To view deadlock information, the [!INCLUDE [ssDEnoversion](../includes/ssdenove
133
133
134
134
<a id="deadlock_xevent"></a>
135
135
136
-
### Deadlock extended event
136
+
### Deadlock Extended Event
137
137
138
138
In [!INCLUDE [ssSQL11](../includes/sssql11-md.md)] and later versions, the `xml_deadlock_report` Extended Event (XEvent) should be used instead of the Deadlock graph event class in SQL Trace or SQL Profiler.
139
139
@@ -160,7 +160,7 @@ FROM (SELECT CAST ([target_data] AS XML) AS Target_Data
160
160
ON xs.address = xt.event_session_address
161
161
WHERE xs.name = N'system_health'
162
162
AND xt.target_name = N'ring_buffer') AS XML_Data
163
-
CROSS APPLY Target_Data.nodes('RingBufferTarget/event[@name="xml_deadlock_report"]') AS XEventData(xdr)
163
+
CROSS APPLY Target_Data.nodes('RingBufferTarget/event[@name="xml_deadlock_report"]') AS XEventData(xdr)
164
164
ORDER BY [Date] DESC;
165
165
```
166
166
@@ -235,6 +235,8 @@ END
235
235
</event>
236
236
```
237
237
238
+
If you want to capture the plan that caused the deadlock, see [Using xEvents to capture an Actual Execution Plan](https://techcommunity.microsoft.com/blog/sqlserver/using-xevents-to-capture-an-actual-execution-plan/392136).
239
+
238
240
For more information, see [Use the system_health session](extended-events/use-the-system-health-session.md)
239
241
240
242
<aid="deadlock_traceflags"></a>
@@ -614,5 +616,5 @@ This scenario of competing `UPDATE` statements results in a deadlock. In this ca
-[Analyze and prevent deadlocks in Azure SQL Database](/azure/azure-sql/database/analyze-prevent-deadlocks)
619
+
-[Analyze and prevent deadlocks in Azure SQL Database and Fabric SQL database](/azure/azure-sql/database/analyze-prevent-deadlocks)
618
620
-[Open, view, and print a deadlock file in SQL Server Management Studio (SSMS)](performance/open-view-and-print-a-deadlock-file-sql-server-management-studio.md)
0 commit comments