how to create an alert when a CPU exceeds an average of 80 percentage in SQL server

Devendra Kumar Sahu 236 Reputation points
2021-10-13T06:13:55.523+00:00

how to create an alert when a CPU exceeds an average of 80 percentage in SQL server.
we configured Mail

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,646 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Tom Phillips 17,716 Reputation points
    2021-10-13T12:17:06.52+00:00

    You do NOT want to do that. It is completely normal and expected behavior for SQL Server to use 100% of the resources available for short periods of time. It is NOT a problem if CPU avg > 80%.

    1 person found this answer helpful.
    0 comments No comments

  2. Seeya Xi-MSFT 16,436 Reputation points
    2021-10-13T08:26:28.29+00:00

    Hi @Devendra Kumar Sahu ,

    Welcome to Microsoft Q&A!
    I want to know if your database is Azure SQL.
    If so, I suggest you learn about Azure Monitor. Please see the following articles:
    Understand how metric alerts work in Azure Monitor
    Task: Creating an alert when CPU exceeds an average of 80 percent.
    If not, please refer to the following article:
    Create a SQL Server WMI Alert for the High CPU
    SQL Server monitoring tool for CPU performance
    Hope these articles could be helpful for you.

    Best regards,
    Seeya


    If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Seeya Xi-MSFT 16,436 Reputation points
    2021-10-18T07:20:08.233+00:00

    Hi @Devendra Kumar Sahu ,

    SQL Server Error 22022

    It occurs due to the SQL Agent cannot connect to the SQL Server database engine.
    Perhaps your sql server agent is started in manual mode. What you need to do is right click -> start it, then right click -> properties -> do the following operation:
    141199-1.png

    WMI errors are more complicated. Can you try the above methods first and then show the errors to me?

    Here is a similar thread:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/64a314c7-ce54-4bf3-86ad-ec7c8b140638/sql-server-alert-using-wmi-event?forum=sqldatabaseengine

    Best regards,
    Seeya


    If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  4. Seeya Xi-MSFT 16,436 Reputation points
    2021-10-25T02:06:32.313+00:00