MS renamed stuff between 2008R2 and 2012. The asynchronous_file_target was renamed to event_file. So use that name instead.
create extended event --sp_server_diagnostics_component_result failed
System information : SQL Server 2016 SP2 CU14 Enterprise
I am planing to cature information related sp_server_diagnostics through extended event. But create extend event as failing as follows not sure why is that as no even is available . Any one can help would be great
CREATE EVENT SESSION [sp_server_diagnostics_component_result]
ON SERVER
ADD EVENT [sp_server_diagnostics_component_result] (set collect_data=1)
ADD TARGET [asynchronous_file_target] (set filename=' C:\DBA\sp_server_diagnostics_component_result\diag.xel');
GO
ALTER EVENT SESSION [sp_server_diagnostics_component_result]
ON SERVER STATE = start;
GO
5 answers
Sort by: Most helpful
-
-
m 4,271 Reputation points
2020-10-14T07:19:57.617+00:00 Hi @Ashwan ,
Quote from this doc. : quick-start-extended-events-in-sql-server-Preparations before demo
...
Ensure that your account has the server permission of ALTER ANY EVENT SESSION.
...And then follow steps as this to create extended event : quick-start-extended-events-in-sql-server
BR,
Mia
If the answer is helpful, please click "Accept Answer" and upvote it.
-
m 4,271 Reputation points
2020-10-16T05:52:03.467+00:00 Hi @Ashwan ,
Not sure what do you mean, I am expecting to capture sp_server_diagnostics thruogh the extended event . So I cant find the event for this and please refer this image bellow
Please choose All in Event library, and then choose Debug in Channel as next:
BR,
Mia
If the answer is helpful, please click "Accept Answer" and upvote it.