I have the following Extended Event session running on Azure SQL DB.
ADD EVENT sqlserver.rpc_completed(
ACTION(mdmget_timestamputc, sqlserver.client_app_name,sqlserver.client_hostname,sqlserver.client_pid,sqlserver.sql_text)
WHERE ([sqlserver].[like_i_sql_unicode_string]([sqlserver].[sql_text],N'%cache%')))
ADD TARGET package0.ring_buffer(SET max_memory=(5120))
WITH (STARTUP_STATE=OFF)
GO
ALTER EVENT SESSION [xe_cacherefresh]
ON DATABASE
STATE = START;
I then call a stored procedure ('my_Cache_name' or 'my_cache_name'), which returns multiple result sets, and I let it complete.
But when I run the following, I get nothing. Running a Azure Data Studio trace, I see it called as rpc_completed, but I still see nothing in the buffer.
IF OBJECT_ID('tempdb..#xevent') is not null
DROP TABLE #xevent
CREATE TABLE #xevent (target_data XML)
INSERT INTO #xevent ( target_data)
SELECT target_data
FROM sys.dm_xe_database_session_targets AS st
INNER JOIN sys.dm_xe_database_sessions AS se
ON CAST(se.address AS BINARY(8)) = CAST(st.event_session_address AS BINARY(8))
WHERE
se.name = 'xe_cacherefresh'
SELECT * FROM #xevent
<RingBufferTarget truncated="0" processingTime="0" totalEventsProcessed="0" eventCount="0" droppedCount="0" memoryUsed="0" />