When you create an Extended Event session, there are a number of properties that you can set. These properties are spread through out the tabs in the Session Properties window.
Below you will see the four tabs, General, Events, Data Storage and Advanced.
Just as a brief summary let’s go over a few of the key properties in each tab.
In the session tab, the obvious properties is the “Session Name”. But there is also another key property, “Start the event session at server start up”. This is an important property that can assure the session starts in the event of a server restart.
The event tab is exactly what you think it might be, it is where you will decide what events you want to capture and what data columns you would like to capture.
There are a number of options for storage and you will set this in the Data Storage tab. Where the data collected is stored is referred to as targets Two of the commonly used targets are ring_buffer, this is memory, and file target.
Which brings to the last table, Advanced. This is where the Max_Dispatch_Latency property can be found. The max_dispatch_latency property is the maximum duration that an event, once captured, would reside in the buffer before written to the target. This doesn’t mean it will always take this long, just the maximum amount of time it will take. The default for this property is 30 seconds. For the most part, this is a good number and should avoid changing it.
You would logically think that the minimum setting would be zero seconds. If you think that way, you are correct. However, 0 does not mean 0 seconds. When this is set to 0 it means the event will stay in the buffer until the buffer becomes full. This is the same set setting the “Unlimited” option you see below. Given this, the true minimum is one second.
When I present my Extended Event session I usually use the Create Database event in my demo. Once, I create the database, I go immediately to the target to see if the event has been written to the target. Usually that takes just a few seconds. I only see the event written to the target about 50% of the time. This is because of the max_dispatch_latency.
Here is a really nice article by Jonathan Kehayias on the properties of an extended event session, click here.
Thanks for visiting my blog and I hope you learned something!