I am running SQL Server 2014 Developer Edition on my PC. I am trying to view the data in the system_health session. In SSMS, I have connected to the database, expanded the server / Management / Extended Events / Sessions. I see AlwaysON_health (stopped) and system_health (running).
When I right-click on the system_health session, I get the following error:
The storage failed to initialize using the provided parameters. (Microsoft.SqlServer.XEventStorage) The Extended Events session named "system_health" could not be found. Make sure the session exists and is started. (Microsoft SQL Server, Error: 25728)
I expand system_health and see the targets package0.event_file and package0.ring_buffer. If I right-click either target and choose "View Target Data", I get this error:
The storage failed to initialize using the provided parameters. (Microsoft.SqlServer.XEventStorage) Cannot view the function 'fn_MSXe_read_event_stream', because it does not exist or you do not have permission. (Microsoft SQL Server, Error: 15151)
The function does exist. I can run it:
select * from fn_MSXe_read_event_stream('system_health', 0);
When I do, I get this error:
Msg 25728, Level 16, State 10, Line 6
The Extended Events session named "system_health" could not be found. Make sure the session exists and is started.
I know the system_health session is there. I see in in the list of sessions:
select * from sys.dm_xe_sessions
address name name
------------------ -------------
0x00000001FF6510C1 system_health
I have tried this with my own custom event sessions. I can't watch the live data on them, either.
I can query the system_health ring buffer target data from sys.dm_xe_session_targets
.
Why can't I watch live data for any extended events session?
(Note that there is a Microsoft feedback item for this issue.)
master
. Setting my default database back tomaster
resolved the error.