Plataan - Microsoft Dynamics - Learning & Competence Management Vincent Bellefroid Koen Stox Steven Renders Conny Schuddinck Steffie Alexiou
A blog about Microsoft Dynamics
Home Archives Subscribe Plataan website

« "People Ready Business" and Microsoft Dynamics | Main | BIC, SWIFT, IBAN, ... hoe zit dat in Dynamics NAV »

25/08/2006

Analyze deadlocks with Sql Server 2005: Profiler DeadLockGraph object.

SqlServer Profiler 2005 contains some new features, one of which is the DeadLockGraph object. With this object enabled in the trace options you can visually see when deadlocks occur, what tables and statements are involved and who was choosen as the deadlock victim.

To do this you should start a new trace in the Sql Server 2005 Profiler. When you create a new trace and after you have connected to the sql instance you would like to monitor you have to select the events you are interested in. You can find them in the 'Events Selection' tab of the trace properties window. Here you have to check the 'Deadlock graph' event. You notice that as soon as this event is selected, a new tab becomes available in the trace properties window: the 'Events Extraction Settings':

Profiler2005_1

If now while the trace is running a deadlock occurs you will be able to see the deadlock graph:

Deadlock

In this graph you really get a lot of information about the deadlock: The statements that are involved, the kind of lock, the victim, the spid of the deadlock process, ... And that's not all, if you right click on the graph you can export to an XML file. This file can then be opened with the Management Studio for further analysis.

Deadlockxml

The Sql profiler has also other enhancements, like for example the possibility to compare/merge the Sql Profiler data with the data coming from a Windows Performance Monitor. If you run a profiler trace and a perfmon trace at the same time you can then save the 2 trace logs and merge them ! But I will tell more on this in another blog message soon ;-)

Comments

The comments to this entry are closed.

October 2011

Mon Tue Wed Thu Fri Sat Sun
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

Plataan Community

Visit us on LinkedIn Visit us on Facebook Visit us on Twitter