Database Reference
In-Depth Information
Figure 28-5. Extended Events events in SQL Server 2012
Each event has a set of associated columns that belong to one of three categories:
Read Only columns contain static information about an event, such as the event GUID,
schema version, and other static information.
Data columns contain run-time event data. For example, sql_statement_completed
events expose various execution statistics- related data columns, such as the number of I/O
operations, CPU time, and other run-time event data.
Customizable columns allow you to change their values during event session creation, and
they control the behavior of the event. For example, the collect_statement column of
sql_statement_completed events controls if a SQL statement is collected when an event
is fired. It is enabled by default; however, you can change its value and disable statement
collection on busy servers. Alternatively, the collect_parameterized_plan_handle
column is disabled by default, but it could be enabled if needed.
You can examine event columns with the sys.dm_exec_object_columns view. Listing 28-3 shows you how to
obtain columns information for the sql_statement_completed event.
Listing 28-3. Examining Extended Events Columns
select
dxoc.column_id
,dxoc.name
,dxoc.type_name as [Data Type]
,dxoc.column_type as [Column Type]
,dxoc.column_value as [Value]
,dxoc.description
from
sys.dm_xe_object_columns dxoc
where
dxoc.object_name = 'sql_statement_completed'
Search WWH ::




Custom Search