Logo
HOW TO
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
 
 
Windows Server

SQL Server 2008 R2 : Performance Monitoring Tools (part 8) - Extended Events Catalog Views and DMVs

5/10/2013 6:09:55 PM
Targets

Targets are event session consumers and indicate where output is located, such as a file, ring buffer, or a bucket with aggregation. Targets can process events synchronously or asynchronously. Extended Events provides several predefined targets you can use as appropriate for directing event output.

You can find a list of available targets in SQL Server 2008 by running the following query:

select * from sys.dm_xe_objects where object_type ='target'

Predicates

Predicates are a set of logical evaluation rules for events when they are processed that serve to filter events. They help reduce the volume of captured data and tailor down the output for analysis. In effect, they enable the Extended Events user to selectively capture event data based on specific criteria.

There are two different types of predicates in SQL Server 2008: pred_compare and pred_source. The pred_compare predicates are comparison functions, such as >=.

To view a list of the pred_compare predicates available in SQL Server 2008, you can run the following query:

select * from sys.dm_xe_objects where object_type = 'pred_compare'

If you run this query, you’ll notice that there are a number of similar pred_compare predicates with the same comparison function but for different data types (for example, greater_than_int64 and greater_than_float64).

The pred_source predicates are extended attributes that can be used within predicates to filter on attributes not carried by the event’s own schema (such as transaction_id or database_id). The available pred_source predicates can be listed by using the following query:

select * from sys.dm_xe_objects where object_type = 'pred_source'

Actions

Actions are programmatic responses or series of responses to an event. Actions are bound to an event, and each event may have a unique set of actions. Actions are performed synchronously in association with bound events. They can be used to accomplish certain tasks or simply provide more information relevant to the events.

There are many types of actions, and they have a wide range of capabilities:

  • Receive a stack dump and inspect data.

  • Store state information in a variable.

  • Bring event data from multiple places together.

  • Append new data to existing event data.

To view a list of the actions available in SQL Server 2008, you can run the following query:

select * from sys.dm_xe_objects where object_type = 'action'

Types and Maps

Two kinds of data types can be defined in an event: scalar types and maps. Scalar types are single values, like integers. Maps are tables that map internal object values to static, predefined, user-friendly descriptions. They help you see what the internal values stand for (making them human consumable) but allow the event to more efficiently store the integer map value rather than the actual text.

Like all the other elements discussed thus far, types and maps can also be viewed by querying the sys.dm_xe_objects catalog view:

select * from sys.dm_xe_objects
where object_type in ('type', 'map')

Although types are relatively self-explanatory, maps require a lookup to expose the associated human-readable text when appropriate. The map values are stored in the DMV called sys.dm_xe_map_values. To list the map_keys and map_values for lock types, for example, you can run the following query:

select * from sys.dm_xe_map_values where name = 'lock_mode'

Extended Events Catalog Views and DMVs

To get metadata information about what events, actions, fields, and targets have been defined, you can use the catalog views supplied with SQL Server.

For catalog views, the following short list shows the SELECT statements and their purposes (that use the predefined SSEE catalog views).

To see event sessions, you use the following:

SELECT * FROM sys.server_event_sessions;

To see actions on each event (of an event session), run this:

SELECT * FROM sys.server_event_session_actions;

To see events in an event session, run the following:

SELECT * FROM sys.server_event_session_events;

To see columns of events and targets, use this statement:

SELECT * FROM sys.server_event_session_fields;

And, to see event targets for an event session, you use the following:

SELECT * FROM sys.server_event_session_targets;

You use the dynamic management views to obtain session metadata and session data itself (as it is being gathered during execution). The metadata is obtained from the catalog views, and the session data is created when you start and run an event session.

To see session dispatcher pools, you use the following statement:

SELECT * FROM sys.dm_os_dispatcher_pools;

To see event package objects, use this:

SELECT * FROM sys.dm_xe_objects;

To see the schema for all objects, run this statement:

SELECT * FROM sys.dm_xe_object_columns;

To see the registered packages in the Extended Events engine, use this:

SELECT * FROM sys.dm_xe_packages;

To see the active Extended Events sessions, run the following:

SELECT * FROM sys.dm_xe_sessions;

To see session targets, run this statement:

SELECT * FROM sys.dm_xe_session_targets;

To see session events, use this:

SELECT * FROM sys.dm_xe_session_events;

To see event session actions, use this:

SELECT * FROM sys.dm_xe_session_event_actions;

To see the mapping of internal keys to readable text, use the following:

SELECT * FROM sys.dm_xe_map_values;

Specific variations might be as follows:

SELECT map_value Keyword from sys.dm_xe_map_values
where name = 'keyword_map';
SELECT map_key, map_value from sys.dm_xe_map_values
where name = 'lock_mode';

And finally, to see the configuration values for objects bound to a session, you use the following:

SELECT * FROM sys.dm_xe_session_object_columns;

Other -----------------
- Microsoft Systems Management Server 2003 : Package Distribution and Management - Monitoring Status
- Microsoft Systems Management Server 2003 : Configuring the Client (part 4) - Managing the Advanced Client Download Cache, Advertised Programs Process Flow
- Microsoft Systems Management Server 2003 : Configuring the Client (part 3)
- Microsoft Systems Management Server 2003 : Configuring the Client (part 2) - Running Advertised Programs on Clients - Advertised Programs Wizard
- Microsoft Systems Management Server 2003 : Configuring the Client (part 1)
- Microsoft Systems Management Server 2003 : Package Distribution and Management - Creating an Advertisement
- SharePoint 2010 : Connecting and Disconnecting Servers with Windows PowerShell, Additional Functionality in SharePoint 2010
- Microsoft Dynamics CRM 4 : Digital Phone Integration (part 3) - c360 CTI for Microsoft CRM
- Microsoft Dynamics CRM 4 : Digital Phone Integration (part 2) - Cisco Unified CallConnector for Microsoft Dynamics CRM
- Microsoft Dynamics CRM 4 : Digital Phone Integration (part 1)
 
 
REVIEW
- First look: Apple Watch

- 10 Amazing Tools You Should Be Using with Dropbox

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
 
VIDEO TUTORIAL
- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
 
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS
Popular keywords
HOW TO Swimlane in Visio Visio sort key Pen and Touch Creating groups in Windows Server Raid in Windows Server Exchange 2010 maintenance Exchange server mail enabled groups Debugging Tools Collaborating
Top 10
- Microsoft Excel : How to Use the VLookUp Function
- Fix and Tweak Graphics and Video (part 3) : How to Fix : My Screen Is Sluggish - Adjust Hardware Acceleration
- Fix and Tweak Graphics and Video (part 2) : How to Fix : Text on My Screen Is Too Small
- Fix and Tweak Graphics and Video (part 1) : How to Fix : Adjust the Resolution
- Windows Phone 8 Apps : Camera (part 4) - Adjusting Video Settings, Using the Video Light
- Windows Phone 8 Apps : Camera (part 3) - Using the Front Camera, Activating Video Mode
- Windows Phone 8 Apps : Camera (part 2) - Controlling the Camera’s Flash, Changing the Camera’s Behavior with Lenses
- Windows Phone 8 Apps : Camera (part 1) - Adjusting Photo Settings
- MDT's Client Wizard : Package Properties
- MDT's Client Wizard : Driver Properties
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro