Identify columns available for extended events

The following query helps identify the columns associated with extended events and the format of the column i.e. int32.

SELECT 
 b.[name] AS package
,a.[object_name] AS [event]
,a.column_id
,a.[name] AS [column]
,a.column_type
,a.[type_name] AS column_storage
,a.column_value
,a.[description] AS column_desc
,b.[description] AS package_desc
FROM sys.dm_xe_object_columns a, sys.dm_xe_packages b
WHERE 1=1
AND a.object_package_guid = b.[guid]
AND a.column_type <> 'readonly'
ORDER by b.[name], a.[object_name],a.column_id;


As the data is typically extracted and used on SQL Server, I would have thought it would be more meaningful for Microsoft to actually use the SQL Server types i.e. bigint, nvarchar(MAX), instead we are supplied with a you guess field and it just adds another unnecessary frustration for the DBA / developer.

Leave a Reply