
-- get the full names of all event
-- for use in CREATE/ALTER EVENT SESSION

-- 254 rows affected
select p.name + '.' + o.name as [Full Name], 
       o.description 
from sys.dm_xe_objects o
join sys.dm_xe_packages p on o.package_guid = p.guid
where o.object_type = 'event' order by p.name, o.name

-- compare with perfmon counters, no direct name correlation

-- 334 rows affected
select distinct object_name, counter_name from sys.dm_os_performance_counters c
order by object_name, counter_name

-- all trace events that can be used for EVENT NOTIFICATIONS
-- 364 rows affected
select * from sys.event_notification_event_types;

-- Compare to event notifications, based on trace events
-- 102 rows affected
select * from sys.event_notification_event_types
 where not type_name like 'DDL%'
 and type between 1000 and 9999
 order by type_name

-- 180 rows affected
select * from sys.trace_events

-- see related views below
select * from sys.trace_categories
select * from sys.trace_event_bindings
select * from sys.trace_subclass_values
select * from sys.trace_columns
