Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

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

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
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)
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server