O'Reilly logo

Microsoft SQL Server 2012 Bible by Aaron Nelson, Jose Chinchilla, Patrick LeBlanc, Jorge Segarra, Adam Jorgensen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Extended Events Object Model

The Extended Events engine is a collection of services and objects that enable and manage events and event processing inside of the SQL Server database engine. The Extended Events engine does not provide any of the events or the actions to take when events are fired. The information associated with the events and the objects associated with events lie in the object model shown in Figure 40.1.

Figure 40.1 This figure lists all objects in the Extended Events object model.

40.1

Packages

The Extended Events objects exist inside of modules called Packages. At the top level, Extended Events organizes its components into nine separate packages, not all of which you can interact with directly. Following are the three packages you're most likely to deal with:

  • The Package0 package provides base functionality used by the other packages.
  • The sqlos package works with the SQLOS events.
  • The sqlserver package works with the rest of SQL Server. In SQL Server 2012 there are actually two different sqlserver packages.

Each of these packages contains several objects. To see the full list of objects within packages, use the following DMV query:

SELECT 
PackageName = p.name, EventName = o.name, 
EventDescription = o.description
FROM sys.dm_xe_objects o 
JOIN sys.dm_xe_packages p ON o.package_guid= p.guid
ORDER BY p.name, o.object_type

Events

An Event is an interesting point ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required