Before using SQL server 2008, in order to capture a deadlock, we had to create a server side/profiler trace or use trace flags 1204, 1222.
If you were lucky enough to work with SQL 2008/2008R2 you could have tried using XEvents (which were introduced in SQL 2008).
SQL Server 2012 added a new feature, System Health (SH). The System Health is the new default trace that we are familiar with, from the old days of SQL Server.
I have previously written about the SH ( System Health ).The most interesting addition regarding this post, is the automatic capture of deadlocks.
The deadlock can be seen in 2 ways:
1) On the XEvent monitor under the system_health monitor:
2) With a T-SQL query that connects to the System Health collector file:
By clicking on the Extend_Event XML filed, we would get the XML file showing all the information about the transaction marked in yellow.
As I said before, System Health is a great tool for the XEvent. You’ll find there a lot of interesting information about your system.