Saturday 16 June 2012

Deadlock Detection

       1.      Connect to SSMS.
2.      Click on menu Tools à SQL Server Profiler.


3.      Select the SQL server Instance


4.      Give a Trace Name and select TSQL_Locks template.


5.      Trace can be saved to a file or to a database table. Select the appropriate box and provide the connection details.


6.      Click on the Run button.

7.      Stop the Trace by clicking the stop button.


8.      Clear the trace


9.      Click on Properties


10.   Go to Events Extraction Setting tab



11.   Select Deadlock XML events separately and choose appropriate option of selecting one file or multiple files for results.


12.   Run the Trace by clicking the Run button.


13.   Remember to stop the trace when done.