SQL Server Extended Events (Extended events)--lifetime of events

Source: Internet
Author: User

SQL Server Extended events (Extended events)--lifetime of events

After you define and start the extended events session, the processing proceeds as usual until the code you are monitoring encounters an event. Describes the steps that are followed for extending the event system.

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;border-bottom:0px;border-left:0px; "alt = "image" src= "http://s3.51cto.com/wyfs02/M01/58/25/wKioL1SqWbSiLh7PAADNJebS3Ls579.jpg" border= "0" height= "314"/ >

The steps are as follows:

1. Perform a check to see if any extended events sessions are monitoring the event. If not, control is returned to the code that contains the event, and then the process continues.

2. Determine the payload of the event, collect all the required information into memory-in other words, build the payload of the event.

3. If any predicates are defined for the event, they are executed. At this point, the predicate result may be that the event should not be consumed. If this is the case, control is returned to the code that contains the event, and then the process continues.

4. Now that the system has learned that the event will be consumed, all actions linked to the event will be executed. Now that the event has a full load, it is ready for consumption.

5. Provide the event to the synchronization target (if any).

6. If there are any asynchronous targets, the event is buffered for subsequent processing.

7. Control is returned to the code that contains the event and then continues processing.

As mentioned earlier, you should take extra care when creating an event session to avoid the impact of synchronization actions or the buffering of asynchronous targets on the performance of the monitored code.



This article is from the SQL Server deep dives blog, so be sure to keep this source http://ultrasql.blog.51cto.com/9591438/1599383

SQL Server Extended Events (Extended events)--lifetime of events

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.