i noticed the sqlhealth extende event is on by default , so can i reduce

Rajesh Kumar Yadav 20 Reputation points
2025-12-12T12:06:09.9233333+00:00

hi,

i noticed the sqlhealth extended event is on by default , and it logs many thing,

Q1) can i reduce few thing so that file size and recording that is wirting from buffer to file can be reduced, thus i will save some resources.

q2) and can i add few events which are required by be like queris which takes more than 15 sec should be logged using

sql_statement_completed,sp_statement_completed

SQL Server Database Engine
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-12T12:06:23.43+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The system_health session is a default Extended Events session that is included with SQL Server and Azure SQL Managed Instance. It is not recommended to stop, alter, or delete this session, as any changes might be overwritten by future product updates. Therefore, you cannot reduce the events that it logs directly.

    However, you can create your own Extended Events session to log specific events, such as those related to queries that take longer than 15 seconds. You can configure your session to include events like sql_statement_completed and sp_statement_completed, allowing you to capture the information you need without affecting the default system_health session.

    To manage the size of the logs, you can set the file size and retention policy for your custom session according to your requirements, which can help save resources.


    References:

    0 comments No comments

  2. Erland Sommarskog 128.9K Reputation points MVP Volunteer Moderator
    2025-12-12T19:06:53.2333333+00:00

    I would recommend that you don't meddle with system_health, but keep it as it is. Myself, I only look at the deadlock events, but I guess that if I admin a server and gets some problems and open a support case, the support engineer will want to check system_health and will not be happy if important events are missing.

    If you want to add other monitoring, for instance of long-running queries, you should do that in a separate event session, not add to system_health.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.