How to save deadlock graph events as .xdl file ?
- On the File menu, click New Trace, and then connect to an instance of SQL Server.
- In the Trace Properties dialog box, type a name for the trace in the Trace name box.
- 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.
- 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.
- Optionally, select the Enable trace stop time check box, and specify a stop date and time.
- Click the Events Selection tab.
- 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.
- On the Events Extraction Setting stab, click Save Deadlock XML Events Separately.
- In the Save As dialog box, enter the name of the file in which to store the deadlock graph events.
- 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
I want list of all error codes & messages of SQL server.
Once some ask this thing to you or this though comes to your mind, I am sure most of us will start goggling or looking into BOL for the details
But SQL server also Contains one row for each system error or warning that can be returned by Microsoft SQL Server.
You can get the List of all the Error codes or messages as
In SQL Server 2000
SELECT * FROM SYSMESSAGES
|error||Unique error number.|
|severity||Severity level of the error.|
|dlevel||For internal use only.|
|description||Explanation of the error with placeholders for parameters.|
|mslangid||System message group ID.|
In SQL Server 2005 & above
SELECT * FROM SYS.MESSAGES
|message_id||ID of the message. Is unique across server. Message IDs less than 50000 are system messages.|
|language_id||Language ID for which the text in text is used, as defined in syslanguages. This is unique for a specified message_id.|
|severity||Severity level of the message, between 1 and 25. This is the same for all message languages within a message_id.|
|is_event_logged||1 = Message is event-logged when an error is raised. This is the same for all message languages within a message_id.|
|text||Text of the message used when the corresponding language_id is active.|