扩展事件XML解析:第10行,字符97,非法限定名称字符

时间:2016-06-13 14:28:10

标签: xml parsing extended-events

我有这个查询,它正常工作,已经创建了作业并安排了它。但是由于这个错误,它突然开始失败

" Msg 9455,Level 16,State 1,Line 1 XML解析:第10行,字符97,非法限定名称字符"

这是我正在运行的查询:

SELECT CAST(
                  REPLACE(
                        REPLACE(XEventData.XEvent.value('(data/value)[1]', 'varchar(max)'), 
                        '', ''),
                  '','')
            AS XML) AS DeadlockGraph
FROM
(SELECT CAST(target_data AS XML) AS TargetData
from sys.dm_xe_session_targets st
join sys.dm_xe_sessions s on s.address = st.event_session_address
where name = 'system_health') AS Data
CROSS APPLY TargetData.nodes ('//RingBufferTarget/event') AS XEventData (XEvent)
where XEventData.XEvent.value('@name', 'varchar(4000)') = 'xml_deadlock_report' 

在结果标签上,这是输出:



if (
					not exists
							(
								select top 1 1
								from 
									[Service].APP_WRK_QueueWorkItem wi with (holdlock, tablock)
								where
									wi.APP_QWI_ID_TypeId=@WorkItemTypeId and
									(
										wi.APP_QWI_ID_StatusId in (0,1,2) 
										or
										wi.APP_QWI_ID_StatusId in (3,4) and dateadd(millisecond,@frequency,wi.APP_QWI_DT_CreationDate)>sysdatetime()
									)
							)
					)    
Proc [Database Id = 50 Object Id = 970486536]   
if (
					not exists
							(
								select top 1 1
								from 
									[Service].APP_WRK_QueueWorkItem wi with (holdlock, tablock)
								where
									wi.APP_QWI_ID_TypeId=@WorkItemTypeId and
									(
										wi.APP_QWI_ID_StatusId in (0,1,2) 
										or
										wi.APP_QWI_ID_StatusId in (3,4) and dateadd(millisecond,@frequency,wi.APP_QWI_DT_CreationDate)>sysdatetime()
									)
							)
					)    
Proc [Database Id = 50 Object Id = 970486536]   




此查询在除此服务器之外的其他服务器上运行正常。你能告诉我我应该去哪里吗?非常感谢。

0 个答案:

没有答案