Microsoft distributes Microsoft SQL Server 2008 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release.

Symptoms

Consider the following scenario. In a Microsoft SQL Server 2008 database, a deadlock occurs. Then, you use the system_health Extended Event session to capture the deadlock graph. In this scenario, you receive the following error message:

Msg 9436, Level 16, State 1, Line 1XML parsing: line 54, character 12, end tag does not match start tag

For example, you run the following query to export the buffer_ring target from the system_health session when a deadlock occurs:

select XEventData.XEvent.value('(data/value)[1]', 'varchar(max)') as DeadlockGraphFROM(select CAST(target_data as xml) as TargetDatafrom sys.dm_xe_session_targets stjoin sys.dm_xe_sessions s on s.address = st.event_session_addresswhere name = 'system_health') AS DataCROSS APPLY TargetData.nodes ('//RingBufferTarget/event') AS XEventData (XEvent)where XEventData.XEvent.value('@name', 'varchar(4000)') = 'xml_deadlock_report'

In this example, the query returns the correct result.However, you can also run the following query to cast this deadlock graph in XML format:

select cast(XEventData.XEvent.value('(data/value)[1]', 'varchar(max)') as xml) as DeadlockGraphFROM(select CAST(target_data as xml) as TargetDatafrom sys.dm_xe_session_targets stjoin sys.dm_xe_sessions s on s.address = st.event_session_addresswhere name = 'system_health') AS DataCROSS APPLY TargetData.nodes ('//RingBufferTarget/event') AS XEventData (XEvent)where XEventData.XEvent.value('@name', 'varchar(4000)') = 'xml_deadlock_report'

In this situation, you expect to see the deadlock graph in XML format. Even if the deadlock graph is displayed incorrectly, you still expect to see valid XML content from the xml_deadlock_report report. However, you receive the following error message:

Msg 9436, Level 16, State 1, Line 1XML parsing: line 54, character 12, end tag does not match start tag

Cause

This problem occurs because the code path that generates the XML schema for the deadlock graph skips over the closing tag of the victim-list element. Additionally, the code path adds an unnecessary tag for the deadlock element.

Resolution

The fix for this issue was first released in Cumulative Update 6 for SQL Server 2008 Service Pack 1. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:

977443 Cumulative update package 6 for SQL Server 2008 Service Pack 1Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

970365 The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 1 was releasedMicrosoft SQL Server 2008 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2008 Service Pack 1 hotfix to an installation of SQL Server 2008 Service Pack 1. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.

SQL Server 2008 R2

Important You must install this fix if you are running SQL Server 2008 R2.The fix for this issue was first released in Cumulative Update 1. For more information about how to obtain this cumulative update package for SQL Server 2008 R2, click the following article number to view the article in the Microsoft Knowledge Base:

981355 Cumulative Update package 1 for SQL Server 2008 R2Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

981356 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 was released

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References

For information about the Incremental Servicing Model for SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:

935897 An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problemsFor more information about the naming schema for SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:

822499New naming schema for Microsoft SQL Server software update packagesFor more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.