1 / 13

SQL Server Extended Events

SQL Server Extended Events. SQL Zaterdag , Utrecht. Norman Gillis, Premier Field Engineering. 17-November-2012. Table of Contents. Why extended events? What is it? The Extended Event Object Model Extended Event Objects Building a Session XEvent MetaData Anatomy of an Event Session

lovie
Download Presentation

SQL Server Extended Events

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SQL Server Extended Events SQL Zaterdag, Utrecht Norman Gillis, Premier Field Engineering 17-November-2012

  2. Table of Contents • Why extended events? • What is it? • The Extended Event Object Model • Extended Event Objects • Building a Session • XEventMetaData • Anatomy of an Event Session • Demo

  3. Eliminate breakpoint/dump technique Why did Microsoft create extended events? XEvent can trace Lock:Acquired and Lock:Released with little degradation

  4. What is it? Requires SQLOS

  5. The Extended Event Object Model

  6. Extended Event Objects SecAudit is for All Actions Audited

  7. Building Your Session The result of this is the event session stored in a system table but it is not running yet Your session is now running

  8. Xevent Metadata

  9. Anatomy of an Event Session create event session myfirstsession on server add event sqlserver.error_reported ( action ( package0.callstack, sqlserver.session_id, sqlserver.sql_text ) where sqlserver.error_reported.error = 208 and package0.counter <= 5 ) add target package0.ring_buffer Can add multiple events across multiple packages for a single session Can mix objects from different packages in a single “add event” Example of property of event Special property of a package that keeps state You can have multiple targets for a session

  10. Pre-Collect • Collection • Post-Collect • Publish Life of an Event • IsEnabled check • Event data collected • Predicate evaluation • Actions executed • data buffered asynch targets • Synchronous targets served

  11. Demo for SQL Server 2008 R2 / 2012 Demo

  12. References • About Event Tracing: • http://msdn.microsoft.com/en-us/windows/hardware/gg487334.aspx • Troubleshooting Performance Problems in SQL Server 2008: • http://msdn.microsoft.com/en-us/library/dd672789(SQL.100).aspx • Technet SQL Server 2008 R2 Extended Events: • http://technet.microsoft.com/en-us/library/bb630282.aspx • MSDN SQL Server 2012 Extended Events: • http://msdn.microsoft.com/en-us/library/bb630282(SQL.110).aspx

  13. Questions?

More Related