Click here to Skip to main content
13,347,168 members (54,671 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


Posted 19 Feb 2013

How to Save Deadlock Graph Events as .xdl file in SQL Server?

, 19 Feb 2013
Rate this:
Please Sign up or sign in to vote.
This post discusses how to save deadlock graph events as .xdl file in SQL Server.

How to Save Deadlock Graph Events as .xdl File ?

  1. On the File menu, click New Trace, and then connect to an instance of SQL Server.
  2. In the Trace Properties dialog box, type a name for the trace in the Trace name box.
  3. In the Use the template list, select a trace template on which to base the trace, or select blank if you do not want to use a template.
  4. Do one of the following:
    • Select the Save to file check box to capture the trace to a file. Specify a value for Set maximum file size.
      Optionally, select Enable file rollover and Server processes trace data.
    • Select the Save to table check box to capture the trace to a database table.
      Optionally, click Set maximum rows, and specify a value.
  5. Optionally, select the Enable trace stop time check box, and specify a stop date and time.

  6. Click the Events Selection tab.
  7. In the Events data column, expand the Locks event category, and then select the Deadlock graph check box. If the Locks event category is not available, check Show all events to display it.

    The Events Extraction Settings tab is added to the Trace Properties dialog box.

  8. On the Events Extraction Setting stab, click Save Deadlock XML Events Separately.
  9. In the Save As dialog box, enter the name of the file in which to store the deadlock graph events.
  10. Click All Deadlock XML batches in a single file to save all deadlock graph events in a single XML file, or click Each Deadlock XML batch in a distinct file to create a new XML file for each deadlock graph.

  11. Deadlock graph captured by SQL Profiler:


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

No Biography provided

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.180111.1 | Last Updated 19 Feb 2013
Article Copyright 2013 by Rohitmssqlfun
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid