扩展事件阻止了sys.dm_xe_objects中缺少的进程报告 [英] extended events blocked process report missing from sys.dm_xe_objects
问题描述
尝试创建服务器事件会话以捕获blocked_process_report& xml_deadlock_report事件发送到文件中,以供以后使用以下语句进行分析;
Trying to create SERVER EVENT SESSION to capture blocked_process_report & xml_deadlock_report events to a file for later analysis with the following statement;
CREATE EVENT SESSION [blocked_process] ON SERVER
ADD EVENT sqlserver.blocked_process_report(
ACTION(sqlserver.client_app_name,
sqlserver.client_hostname,
sqlserver.database_name)) ,
ADD EVENT sqlserver.xml_deadlock_report (
ACTION(sqlserver.client_app_name,
sqlserver.client_hostname,
sqlserver.database_name))
ADD TARGET package0.asynchronous_file_target
(SET filename = N'c:\temp\XEventSessions\blocked_process.xel',
metadatafile = N'c:\temp\XEventSessions\blocked_process.xem',
max_file_size=(65536),
max_rollover_files=5)
WITH (MAX_DISPATCH_LATENCY = 5SECONDS)
收到以下错误,尝试执行此语句;
Receive the following error try to execute this statement;
25623消息,第16级,状态1,第1行 事件名称"sqlserver.blocked_process_report"无效,或者找不到对象**
Msg 25623, Level 16, State 1, Line 1 The event name, "sqlserver.blocked_process_report", is invalid, or the object could not be found**
名称顺序为 sys.dm_xe_objects
选择*从sys.dm_xe_objects 按名称排序;
SELECT * FROM sys.dm_xe_objects order by name;
从binary_data变为boolean,未找到"blocked_process_report",因此发生错误.
Goes from binary_data to boolean, no "blocked_process_report" found, hence the error.
当前版本:Microsoft SQL Server 2008 R2(SP2)-10.50.4000.0(X64)2012年6月28日08:36:30版权所有(c)Windows NT 6.1(内部版本7601)上的Microsoft Corporation Express Edition(64位): Service Pack 1)
Current version: Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64) Jun 28 2012 08:36:30 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)
我看到有关此失踪事件的其他参考文献,但没有答复.
I see other references to questions regarding this missing event but no responses.
我在做什么错了?
推荐答案
不幸的是,blocked_process_report是作为可跟踪的扩展事件添加到SQL Server 2012中的.
Unfortunately, the blocked_process_report was added as a traceable extended event in SQL Server 2012.
由于直到SQL Server 2012才添加扩展事件向导,因此我将使用以下查询来查看可用的扩展事件:
Since the extended events wizard(s) weren't added until SQL Server 2012, I would use the following query to view the available extended events:
SELECT *
FROM sys.dm_xe_objects AS Events
WHERE Events.object_type = 'event' AND Events.name LIKE '%blocked%'
ORDER BY Events.name;
或者甚至更好地阅读此乔纳森·凯海亚斯(Jonathan Kehayias)的优秀文章.
Or even better read this EXCEPTIONALLY good article by Jonathan Kehayias.
这篇关于扩展事件阻止了sys.dm_xe_objects中缺少的进程报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!