Hi,
I created a XE session in SQL Server 2008 to capture deadlocks (xml_deadlock_report), but the result is returned in CDATA inside the value field.
This way became more difficult to query the result for information about the deadlock. I already tested this in SQL Server 2012 and the result is XML inside the value, not CDATA.
Is there any configuration I can use to get the result in XML or this really a difference between 2008 and 2012 ?
Here the creation of the session:
CREATE EVENT SESSION [Deadlocks] ON SERVER
ADD EVENT sqlserver.xml_deadlock_report(
ACTION(package0.callstack,sqlserver.client_app_name,sqlserver.client_hostname,sqlserver.database_id,sqlserver.is_system,sqlserver.session_nt_username,sqlserver.sql_text,sqlserver.username))
ADD TARGET package0.asynchronous_file_target(SET filename=N'E:\XEL\Deadlocks.xel',max_file_size=(100),max_rollover_files=(5))
WITH (MAX_MEMORY=4096 KB,EVENT_RETENTION_MODE=ALLOW_SINGLE_EVENT_LOSS,MAX_DISPATCH_LATENCY=30 SECONDS,MAX_EVENT_SIZE=0 KB,
MEMORY_PARTITION_MODE=NONE,TRACK_CAUSALITY=OFF,STARTUP_STATE=ON)
GO
Here a small peace of the result:
<event name="xml_deadlock_report" package="sqlserver" id="123" timestamp="2014-07-03T21:19:50.068Z"><data name="xml_report">
<value><deadlock>
<victim-list>
<victimProcess id="process40c4bc8"/>
</victim-list>
<process-list>
<process id="process40c4bc8" taskpriority="0" logused="400" waitresource="PAGE: 8:1:105636" waittime="4053" ownerId="627488528" transactionname="implicit_transaction" lasttranstarted="2014-07-03T18:20:55.113" XDES="0xac2bc9f0" lockMode="IX" schedulerid="8" kpid="17100" status="suspended" spid="73" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2014-07-03T18:20:56.150" lastbatchcompleted="2014-07-03T18:20:56.150" clientapp="jTDS" hostname="UPA-SRV-BOTA" hostpid="123" loginname="stok" isolationlevel="read committed (2)" xactid="627488528" currentdb="8" lockTimeout="4294967295" clientoption1="671090784" clientoption2="128058">
<executionStack>
Inside the 'value' everything is CDATA, so I can't use XML query on these nodes.
Thank you !
Dennes - Se resolveu, classifique a mensagem, por favor - [http://www.bufaloinfo.com.br] NOVO DVD Segurança no ASP.NET : http://www.bufaloinfo.com.br/LearingSeriesSegurancaASPNET2.asp