Download presentation
Presentation is loading. Please wait.
Published bySebastian Falk Modified over 6 years ago
1
Using XEvents to determine delays caused by logon triggers or resource governor
Trayce Jordan MCM, MCA, CISSP Architect Microsoft Corporation @SeekWellDBA
2
SQL Saturday 734 Dallas Sponsors
3
Derive it from application side
How can I use determine how much a logon trigger or Resource Group Classifier function affects logon times? Ring buffers Derive it from application side XEvents
4
Our Agenda Open forum Show how to view impact with Ring Buffers
Show how to use OSTRESS View impact using XEvents Open forum
5
This is what we’re looking for!
6
Using Ring Buffers SYS.dm_os_ring_buffers Limited sample size (Ring!)
Have to parse XML (yuck) Lose info after restart Built-in – you don’t have to configure the ring buffer for this – it’s just there. But ring buffers (by definition have limited number of entries). 256 entries / scheduler The data from the Ring Buffer needs to be shredded from XML into tabular form The ring buffers are cleared upon restart.
7
select distinct ring_buffer_type from sys.dm_os_ring_buffers
Demo1 ring_buffer_type RING_BUFFER_CLRAPPDOMAIN RING_BUFFER_MEMORY_BROKER_CLERKS RING_BUFFER_RESOURCE_MONITOR RING_BUFFER_SCHEDULER_MONITOR RING_BUFFER_SECURITY_CACHE RING_BUFFER_MEMORY_BROKER RING_BUFFER_SECURITY_ERROR RING_BUFFER_XE_BUFFER_STATE RING_BUFFER_HOBT_SCHEMAMGR RING_BUFFER_SCHEDULER RING_BUFFER_EXCEPTION RING_BUFFER_QE_MEM_BUFF_POOL_RESERVE RING_BUFFER_CONNECTIVITY RING_BUFFER_XE_LOG select distinct ring_buffer_type from sys.dm_os_ring_buffers DEMO1.SQL
8
Using XEvents preconnect_completed Unlimited sample size
Histogram – easy to see quick Can save off data to file as well The Xevent to use is the preconnect_completed Because it is an Xevent and not a ring buffer, you can have unlimited data points. Using the Histogram target (even in real-time) you can see the effect without having to parse ugly XML You can also have a file target to save for future analysis. Only drawback that I can see is that be default you don’t get the SPID -- you have to remember to add it.
9
Demo2
10
References Histogram Target
Targets for Extended Events in SQL Server An Xevent A Day: 31 days of Extended Events Resource Governor
11
References Logon Triggers
Create Trigger RML Utilities Description of the Replay Markup Language (RML) Utilities for SQL Server Resource Governor Classifier Function
12
Thank you! Questions? Trayce.Jordan@microsoft.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.