Do you need to find out where the extended events eventfile is located? Simply run the query below and use the WHERE clause if you know the name of the XE session.
[sql]
SELECT
s.name,
CAST(st.target_data AS XML).value(‘(/EventFileTarget/File/@name)[1]’,’nvarchar(256)’) AS target_data_file,
CAST(st.target_data AS XML) AS target_data_xml
FROM sys.dm_xe_session_targets st
JOIN sys.dm_xe_sessions s
ON st.event_session_address = s.[address]
WHERE s.name = ‘Custom XE Session Name’ — Optional if you know the name
[/sql]
More info about the DMVs