{"id":3997,"date":"2022-12-14T07:00:00","date_gmt":"2022-12-14T04:00:00","guid":{"rendered":"https:\/\/www.dataplatform.gr\/?p=3997"},"modified":"2023-11-26T18:04:28","modified_gmt":"2023-11-26T15:04:28","slug":"pos-mporoyme-na-lamvanoyme-email-opote-echo","status":"publish","type":"post","link":"https:\/\/www.dataplatform.gr\/en\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/","title":{"rendered":"How can we get emails whenever we have high CPU Usage in SQL Server"},"content":{"rendered":"<p>In this article we will see a script that creates one <strong>SQL Server Agent Job<\/strong> which will notify us by email whenever the CPU exceeds a threshold. It derives the information not from performance counters of the operating system but from the default <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/extended-events\/extended-events?view=sql-server-ver15\" target=\"_blank\" rel=\"noreferrer noopener\">Extended Event<\/a> of <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/extended-events\/use-the-system-health-session?view=sql-server-ver15\" target=\"_blank\" rel=\"noreferrer noopener\">system_health<\/a> that exists in every SQL Server installation. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u03c4\u03b1-\u03b2\u03ae\u03bc\u03b1\u03c4\u03b1\">The footsteps<\/h2>\n\n\n\n<p>First we should have enabled Database Mail in SQL Server. We have seen how this is done in <a href=\"https:\/\/www.dataplatform.gr\/en\/pos-stelnoyme-email-mesa-apo-ton-sql-server\/\">this <\/a><a href=\"https:\/\/www.dataplatform.gr\/en\/pos-stelnoyme-email-mesa-apo-ton-sql-server\/\" target=\"_blank\" rel=\"noreferrer noopener\">article<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\u03c4\u03bf-transact-sql-script\">The Transact SQL Script<\/h4>\n\n\n\n<p>With the following script that I have prepared, a SQL Server Agent Job will be created which will run every 5 minutes and will check the CPU Usage through <strong><em>system_health <\/em><\/strong>Extended Event. If it exceeds the threshold we set in the code, it will send an email with the profile we set.<\/p>\n\n\n\n<p>The only information we need to change per case is (line 59):<\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\" data-no-auto-translation=\"\"><code>IF  cast(@usage as int) &gt; 95    <strong>&lt;----- The limit \/ threshold of CPU Usage that we want to send us emails above<\/strong>\nbegin\n\texec msdb.dbo.sp_send_dbmail\n\t@profile_name = ''gmail'',       <strong>&lt;----- The profile name we made to send email in the first step<\/strong>\n\t@recipients = ''info@dataplatform.gr'',    <strong>&lt;----- And the recipients of the email<\/strong>\n\t@subject = @sub,\n\t@body = @bod;\nend;<\/code><\/pre>\n\n\n\n<p>After making the above modifications to the following script, all that remains is to run in a new query window on the instance:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">USE [msdb]\nGO\n\n\/****** Object:  Job [Alert for high CPU]    Script Date: 29\/10\/2021 05:00:31 \u00ec\u00ec ******\/\nBEGIN TRANSACTION\nDECLARE @ReturnCode INT\nSELECT @ReturnCode = 0\n\/****** Object:  JobCategory [[Uncategorized (Local)]]    Script Date: 29\/10\/2021 05:00:31 \u00ec\u00ec ******\/\nIF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE name=N'[Uncategorized (Local)]' AND category_class=1)\nBEGIN\nEXEC @ReturnCode = msdb.dbo.sp_add_category @class=N'JOB', @type=N'LOCAL', @name=N'[Uncategorized (Local)]'\nIF (@@ERROR &lt;> 0 OR @ReturnCode &lt;> 0) GOTO QuitWithRollback\n\nEND\n\nDECLARE @jobId BINARY(16)\nEXEC @ReturnCode =  msdb.dbo.sp_add_job @job_name=N'Alert for high CPU', \n\t\t@enabled=1, \n\t\t@notify_level_eventlog=0, \n\t\t@notify_level_email=0, \n\t\t@notify_level_netsend=0, \n\t\t@notify_level_page=0, \n\t\t@delete_level=0, \n\t\t@description=N'No description available.', \n\t\t@category_name=N'[Uncategorized (Local)]', \n\t\t@owner_login_name=N'sa', @job_id = @jobId OUTPUT\nIF (@@ERROR &lt;> 0 OR @ReturnCode &lt;> 0) GOTO QuitWithRollback\n\/****** Object:  Step [step1]    Script Date: 29\/10\/2021 05:00:31 \u00ec\u00ec ******\/\nEXEC @ReturnCode = msdb.dbo.sp_add_jobstep @job_id=@jobId, @step_name=N'step1', \n\t\t@step_id=1, \n\t\t@cmdexec_success_code=0, \n\t\t@on_success_action=1, \n\t\t@on_success_step_id=0, \n\t\t@on_fail_action=2, \n\t\t@on_fail_step_id=0, \n\t\t@retry_attempts=0, \n\t\t@retry_interval=0, \n\t\t@os_run_priority=0, @subsystem=N'TSQL', \n\t\t@command=N'set ansi_warnings on\ngo\nset ansi_padding on\ngo\nset quoted_identifier on\ngo\ndeclare \n@usage  int,\n@sub nvarchar(max),\n@bod nvarchar(max)\nset @usage =\n(\t\tSELECT 100-avg(record.value(''(.\/Record\/SchedulerMonitorEvent\/SystemHealth\/SystemIdle)[1]'', ''INT'')) as ''Cpu Usage %''\n\t\t\t\t\tFROM ( \n                        SELECT top 5 CONVERT(xml, record) AS [record],dateadd (ms,timestamp - (select ms_ticks from sys.dm_os_sys_info),getdate()) as ''Time''\n\t\t\t\t\t\tFROM sys.dm_os_ring_buffers\n                        WHERE ring_buffer_type = N''RING_BUFFER_SCHEDULER_MONITOR''\n                        AND record LIKE ''%&lt;SystemHealth>%''\n\t\t\t\t\t\torder by time desc) AS x) ;\nset @sub = (select ''SQL Server Alert System: High CPU Usage at '' + @@servername);\nset @bod = (select ''DESCRIPTION: At '' + cast(getdate() as nvarchar) +'' on SQL Server '' + @@servername +'', CPU usage was '' +cast(@usage as nvarchar)+ ''%!!!!'');\nIF  cast(@usage as int) > 95\nbegin\n\texec msdb.dbo.sp_send_dbmail\n\t@profile_name = ''gmail'',\n\t@recipients = ''info@dataplatform.gr'',\n\t@subject = @sub,\n\t@body = @bod;\nend;\n', \n\t\t@database_name=N'master', \n\t\t@flags=0\nIF (@@ERROR &lt;> 0 OR @ReturnCode &lt;> 0) GOTO QuitWithRollback\nEXEC @ReturnCode = msdb.dbo.sp_update_job @job_id = @jobId, @start_step_id = 1\nIF (@@ERROR &lt;> 0 OR @ReturnCode &lt;> 0) GOTO QuitWithRollback\nEXEC @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id=@jobId, @name=N'daily', \n\t\t@enabled=1, \n\t\t@freq_type=4, \n\t\t@freq_interval=1, \n\t\t@freq_subday_type=4, \n\t\t@freq_subday_interval=5, \n\t\t@freq_relative_interval=0, \n\t\t@freq_recurrence_factor=0, \n\t\t@active_start_date=20211029, \n\t\t@active_end_date=99991231, \n\t\t@active_start_time=0, \n\t\t@active_end_time=235959, \n\t\t@schedule_uid=N'df24cb48-55e9-436a-a0de-56d4dd5139a3'\nIF (@@ERROR &lt;> 0 OR @ReturnCode &lt;> 0) GOTO QuitWithRollback\nEXEC @ReturnCode = msdb.dbo.sp_add_jobserver @job_id = @jobId, @server_name = N'(local)'\nIF (@@ERROR &lt;> 0 OR @ReturnCode &lt;> 0) GOTO QuitWithRollback\nCOMMIT TRANSACTION\nGOTO EndSave\nQuitWithRollback:\n    IF (@@TRANCOUNT > 0) ROLLBACK TRANSACTION\nEndSave:\nGO\n\n\n<\/pre>\n\n\n\n<p>When we run it we will see in the Object Explorer of SQL Server Management Studio that it has created a new Job in the SQL Server Agent:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"447\" height=\"541\" src=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2021\/10\/cea-02.png\" alt=\"\" class=\"wp-image-3996\" srcset=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2021\/10\/cea-02.png 447w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2021\/10\/cea-02-248x300.png 248w\" sizes=\"auto, (max-width: 447px) 100vw, 447px\" \/><figcaption class=\"wp-element-caption\">01<\/figcaption><\/figure>\n\n\n\n<p>After a while we will see that it sent by itself without doing anything else an email about High CPU Usage (for example I changed the threshold from above 95% to 10% to be sent):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"676\" height=\"255\" src=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2021\/10\/cea-01.png\" alt=\"\" class=\"wp-image-4002\" srcset=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2021\/10\/cea-01.png 676w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2021\/10\/cea-01-300x113.png 300w\" sizes=\"auto, (max-width: 676px) 100vw, 676px\" \/><figcaption class=\"wp-element-caption\">02<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u03c0\u03b7\u03b3\u03ad\u03c2\">Sources:<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/extended-events\/use-the-system-health-session?view=sql-server-ver15\" target=\"_blank\" rel=\"noreferrer noopener\">Use the system_health Session<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/extended-events\/extended-events?view=sql-server-ver15\" target=\"_blank\" rel=\"noreferrer noopener\">Extended events overview<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/system-stored-procedures\/sp-send-dbmail-transact-sql?view=sql-server-ver15\" target=\"_blank\" rel=\"noreferrer noopener\">sp_send_dbmail (Transact-SQL)<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>In this article we will see a script that creates a SQL Server Agent Job that will notify us by email whenever the CPU exceeds a threshold. It derives the information not from performance counters of the operating system but from the default Extended Event of system_health that exists in every SQL Server installation. The footsteps [\u2026]<\/p>","protected":false},"author":1,"featured_media":702,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,15],"tags":[134,29,23,153,30,6],"class_list":["post-3997","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-databases","category-ms-sqlserver","tag-alerting","tag-databases","tag-microsoft","tag-monitoring","tag-rdbms","tag-sqlserver"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03bb\u03b1\u03bc\u03b2\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 email \u03cc\u03c0\u03bf\u03c4\u03b5 \u03ad\u03c7\u03bf\u03c5\u03bc\u03b5 \u03c5\u03c8\u03b7\u03bb\u03cc CPU Usage \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dataplatform.gr\/en\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03bb\u03b1\u03bc\u03b2\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 email \u03cc\u03c0\u03bf\u03c4\u03b5 \u03ad\u03c7\u03bf\u03c5\u03bc\u03b5 \u03c5\u03c8\u03b7\u03bb\u03cc CPU Usage \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr\" \/>\n<meta property=\"og:description\" content=\"\u03a3\u03b5 \u03b1\u03c5\u03c4\u03cc \u03c4\u03bf \u03ac\u03c1\u03b8\u03c1\u03bf \u03b8\u03b1 \u03b4\u03bf\u03cd\u03bc\u03b5 \u03ad\u03bd\u03b1 script \u03c0\u03bf\u03c5 \u03b4\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03b5\u03af \u03ad\u03bd\u03b1 SQL Server Agent Job \u03c4\u03bf \u03bf\u03c0\u03bf\u03af\u03bf \u03b8\u03b1 \u03bc\u03b1\u03c2 \u03b5\u03bd\u03b7\u03bc\u03b5\u03c1\u03ce\u03bd\u03b5\u03b9 \u03bc\u03b5 email \u03cc\u03c0\u03bf\u03c4\u03b5 \u03c4\u03bf CPU \u03be\u03b5\u03c0\u03b5\u03c1\u03ac\u03c3\u03b5\u03b9 \u03ad\u03bd\u03b1 threshold. \u03a4\u03b7\u03bd \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b1 \u03c4\u03b7\u03bd \u03b1\u03bd\u03c4\u03bb\u03ad\u03b9 \u03cc\u03c7\u03b9 \u03b1\u03c0\u03cc performance counters \u03c4\u03bf\u03c5 \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03b9\u03ba\u03bf\u03cd \u03b1\u03bb\u03bb\u03ac \u03b1\u03c0\u03cc \u03c4\u03bf default Extended Event \u03c4\u03bf\u03c5 system_health \u03c0\u03bf\u03c5 \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9 \u03c3\u03c4\u03b7\u03bd \u03ba\u03ac\u03b8\u03b5 \u03b5\u03b3\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7 SQL Server. \u03a4\u03b1 \u03b2\u03ae\u03bc\u03b1\u03c4\u03b1 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dataplatform.gr\/en\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/\" \/>\n<meta property=\"og:site_name\" content=\"DataPlatform.gr\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dataplatform.gr\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-14T04:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-26T15:04:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Stratos Matzouranis\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Stratos Matzouranis\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-lamvanoyme-email-opote-echo\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-lamvanoyme-email-opote-echo\\\/\"},\"author\":{\"name\":\"Stratos Matzouranis\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/person\\\/e87bf4fd02b65cb6aa0942f87245bbaf\"},\"headline\":\"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03bb\u03b1\u03bc\u03b2\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 email \u03cc\u03c0\u03bf\u03c4\u03b5 \u03ad\u03c7\u03bf\u03c5\u03bc\u03b5 \u03c5\u03c8\u03b7\u03bb\u03cc CPU Usage \u03c3\u03c4\u03bf\u03bd SQL Server\",\"datePublished\":\"2022-12-14T04:00:00+00:00\",\"dateModified\":\"2023-11-26T15:04:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-lamvanoyme-email-opote-echo\\\/\"},\"wordCount\":74,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-lamvanoyme-email-opote-echo\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_sqlserver.png\",\"keywords\":[\"Alerting\",\"Databases\",\"Microsoft\",\"Monitoring\",\"RDBMS\",\"SQL Server\"],\"articleSection\":[\"Databases\",\"Microsoft SQL Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-lamvanoyme-email-opote-echo\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-lamvanoyme-email-opote-echo\\\/\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-lamvanoyme-email-opote-echo\\\/\",\"name\":\"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03bb\u03b1\u03bc\u03b2\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 email \u03cc\u03c0\u03bf\u03c4\u03b5 \u03ad\u03c7\u03bf\u03c5\u03bc\u03b5 \u03c5\u03c8\u03b7\u03bb\u03cc CPU Usage \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-lamvanoyme-email-opote-echo\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-lamvanoyme-email-opote-echo\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_sqlserver.png\",\"datePublished\":\"2022-12-14T04:00:00+00:00\",\"dateModified\":\"2023-11-26T15:04:28+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-lamvanoyme-email-opote-echo\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-lamvanoyme-email-opote-echo\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-lamvanoyme-email-opote-echo\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_sqlserver.png\",\"contentUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_sqlserver.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-lamvanoyme-email-opote-echo\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0391\u03c1\u03c7\u03b9\u03ba\u03ae\",\"item\":\"https:\\\/\\\/www.dataplatform.gr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Databases\",\"item\":\"https:\\\/\\\/www.dataplatform.gr\\\/category\\\/databases\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Microsoft SQL Server\",\"item\":\"https:\\\/\\\/www.dataplatform.gr\\\/category\\\/databases\\\/ms-sqlserver\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03bb\u03b1\u03bc\u03b2\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 email \u03cc\u03c0\u03bf\u03c4\u03b5 \u03ad\u03c7\u03bf\u03c5\u03bc\u03b5 \u03c5\u03c8\u03b7\u03bb\u03cc CPU Usage \u03c3\u03c4\u03bf\u03bd SQL Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#website\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/\",\"name\":\"dataplatform.gr - Sky is not the limit!\",\"description\":\"\u0398\u03b5\u03c9\u03c1\u03af\u03b1, \u03bf\u03b4\u03b7\u03b3\u03bf\u03af \u03ba\u03b1\u03b9 \u03c3\u03ba\u03ad\u03c8\u03b5\u03b9\u03c2 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03c4\u03b7 \u03b4\u03bf\u03c5\u03bb\u03b5\u03b9\u03ac \u03c3\u03b1\u03c2 \u03c0\u03b9\u03bf \u03c0\u03b1\u03c1\u03b1\u03b3\u03c9\u03b3\u03b9\u03ba\u03ac \u03ba\u03b1\u03b9 \u03c0\u03b9\u03bf \u03b5\u03cd\u03ba\u03bf\u03bb\u03b1 \u03c0\u03ac\u03bd\u03c9 \u03c3\u03c4\u03b9\u03c2 \u03b2\u03ac\u03c3\u03b5\u03b9\u03c2 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd, \u03c3\u03c4\u03b7\u03bd SQL, \u03c3\u03c4\u03bf Business Intelligence \u03ba\u03b1\u03b9 \u03c3\u03c4\u03b1 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1 \u03b3\u03b5\u03bd\u03b9\u03ba\u03cc\u03c4\u03b5\u03c1\u03b1.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dataplatform.gr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#organization\",\"name\":\"dataplatform.gr\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_logo_wbacki.png\",\"contentUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_logo_wbacki.png\",\"width\":322,\"height\":139,\"caption\":\"dataplatform.gr\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dataplatform.gr\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dataplatform-gr\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/person\\\/e87bf4fd02b65cb6aa0942f87245bbaf\",\"name\":\"Stratos Matzouranis\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g\",\"caption\":\"Stratos Matzouranis\"},\"sameAs\":[\"https:\\\/\\\/www.dataplatform.gr\"],\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/en\\\/author\\\/stratos-matzouranis\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03bb\u03b1\u03bc\u03b2\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 email \u03cc\u03c0\u03bf\u03c4\u03b5 \u03ad\u03c7\u03bf\u03c5\u03bc\u03b5 \u03c5\u03c8\u03b7\u03bb\u03cc CPU Usage \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dataplatform.gr\/en\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/","og_locale":"en_US","og_type":"article","og_title":"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03bb\u03b1\u03bc\u03b2\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 email \u03cc\u03c0\u03bf\u03c4\u03b5 \u03ad\u03c7\u03bf\u03c5\u03bc\u03b5 \u03c5\u03c8\u03b7\u03bb\u03cc CPU Usage \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr","og_description":"\u03a3\u03b5 \u03b1\u03c5\u03c4\u03cc \u03c4\u03bf \u03ac\u03c1\u03b8\u03c1\u03bf \u03b8\u03b1 \u03b4\u03bf\u03cd\u03bc\u03b5 \u03ad\u03bd\u03b1 script \u03c0\u03bf\u03c5 \u03b4\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03b5\u03af \u03ad\u03bd\u03b1 SQL Server Agent Job \u03c4\u03bf \u03bf\u03c0\u03bf\u03af\u03bf \u03b8\u03b1 \u03bc\u03b1\u03c2 \u03b5\u03bd\u03b7\u03bc\u03b5\u03c1\u03ce\u03bd\u03b5\u03b9 \u03bc\u03b5 email \u03cc\u03c0\u03bf\u03c4\u03b5 \u03c4\u03bf CPU \u03be\u03b5\u03c0\u03b5\u03c1\u03ac\u03c3\u03b5\u03b9 \u03ad\u03bd\u03b1 threshold. \u03a4\u03b7\u03bd \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b1 \u03c4\u03b7\u03bd \u03b1\u03bd\u03c4\u03bb\u03ad\u03b9 \u03cc\u03c7\u03b9 \u03b1\u03c0\u03cc performance counters \u03c4\u03bf\u03c5 \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03b9\u03ba\u03bf\u03cd \u03b1\u03bb\u03bb\u03ac \u03b1\u03c0\u03cc \u03c4\u03bf default Extended Event \u03c4\u03bf\u03c5 system_health \u03c0\u03bf\u03c5 \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9 \u03c3\u03c4\u03b7\u03bd \u03ba\u03ac\u03b8\u03b5 \u03b5\u03b3\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7 SQL Server. \u03a4\u03b1 \u03b2\u03ae\u03bc\u03b1\u03c4\u03b1 [&hellip;]","og_url":"https:\/\/www.dataplatform.gr\/en\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/","og_site_name":"DataPlatform.gr","article_publisher":"https:\/\/www.facebook.com\/dataplatform.gr\/","article_published_time":"2022-12-14T04:00:00+00:00","article_modified_time":"2023-11-26T15:04:28+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png","type":"image\/png"}],"author":"Stratos Matzouranis","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Stratos Matzouranis","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/#article","isPartOf":{"@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/"},"author":{"name":"Stratos Matzouranis","@id":"https:\/\/www.dataplatform.gr\/#\/schema\/person\/e87bf4fd02b65cb6aa0942f87245bbaf"},"headline":"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03bb\u03b1\u03bc\u03b2\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 email \u03cc\u03c0\u03bf\u03c4\u03b5 \u03ad\u03c7\u03bf\u03c5\u03bc\u03b5 \u03c5\u03c8\u03b7\u03bb\u03cc CPU Usage \u03c3\u03c4\u03bf\u03bd SQL Server","datePublished":"2022-12-14T04:00:00+00:00","dateModified":"2023-11-26T15:04:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/"},"wordCount":74,"commentCount":0,"publisher":{"@id":"https:\/\/www.dataplatform.gr\/#organization"},"image":{"@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png","keywords":["Alerting","Databases","Microsoft","Monitoring","RDBMS","SQL Server"],"articleSection":["Databases","Microsoft SQL Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dataplatform.gr\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/","url":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/","name":"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03bb\u03b1\u03bc\u03b2\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 email \u03cc\u03c0\u03bf\u03c4\u03b5 \u03ad\u03c7\u03bf\u03c5\u03bc\u03b5 \u03c5\u03c8\u03b7\u03bb\u03cc CPU Usage \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr","isPartOf":{"@id":"https:\/\/www.dataplatform.gr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/#primaryimage"},"image":{"@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png","datePublished":"2022-12-14T04:00:00+00:00","dateModified":"2023-11-26T15:04:28+00:00","breadcrumb":{"@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dataplatform.gr\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/#primaryimage","url":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png","contentUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-lamvanoyme-email-opote-echo\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0391\u03c1\u03c7\u03b9\u03ba\u03ae","item":"https:\/\/www.dataplatform.gr\/"},{"@type":"ListItem","position":2,"name":"Databases","item":"https:\/\/www.dataplatform.gr\/category\/databases\/"},{"@type":"ListItem","position":3,"name":"Microsoft SQL Server","item":"https:\/\/www.dataplatform.gr\/category\/databases\/ms-sqlserver\/"},{"@type":"ListItem","position":4,"name":"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03bb\u03b1\u03bc\u03b2\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 email \u03cc\u03c0\u03bf\u03c4\u03b5 \u03ad\u03c7\u03bf\u03c5\u03bc\u03b5 \u03c5\u03c8\u03b7\u03bb\u03cc CPU Usage \u03c3\u03c4\u03bf\u03bd SQL Server"}]},{"@type":"WebSite","@id":"https:\/\/www.dataplatform.gr\/#website","url":"https:\/\/www.dataplatform.gr\/","name":"dataplatform.gr - Sky is not the limit!","description":"\u0398\u03b5\u03c9\u03c1\u03af\u03b1, \u03bf\u03b4\u03b7\u03b3\u03bf\u03af \u03ba\u03b1\u03b9 \u03c3\u03ba\u03ad\u03c8\u03b5\u03b9\u03c2 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03c4\u03b7 \u03b4\u03bf\u03c5\u03bb\u03b5\u03b9\u03ac \u03c3\u03b1\u03c2 \u03c0\u03b9\u03bf \u03c0\u03b1\u03c1\u03b1\u03b3\u03c9\u03b3\u03b9\u03ba\u03ac \u03ba\u03b1\u03b9 \u03c0\u03b9\u03bf \u03b5\u03cd\u03ba\u03bf\u03bb\u03b1 \u03c0\u03ac\u03bd\u03c9 \u03c3\u03c4\u03b9\u03c2 \u03b2\u03ac\u03c3\u03b5\u03b9\u03c2 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd, \u03c3\u03c4\u03b7\u03bd SQL, \u03c3\u03c4\u03bf Business Intelligence \u03ba\u03b1\u03b9 \u03c3\u03c4\u03b1 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1 \u03b3\u03b5\u03bd\u03b9\u03ba\u03cc\u03c4\u03b5\u03c1\u03b1.","publisher":{"@id":"https:\/\/www.dataplatform.gr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dataplatform.gr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dataplatform.gr\/#organization","name":"dataplatform.gr","url":"https:\/\/www.dataplatform.gr\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dataplatform.gr\/#\/schema\/logo\/image\/","url":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_logo_wbacki.png","contentUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_logo_wbacki.png","width":322,"height":139,"caption":"dataplatform.gr"},"image":{"@id":"https:\/\/www.dataplatform.gr\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dataplatform.gr\/","https:\/\/www.linkedin.com\/company\/dataplatform-gr\/"]},{"@type":"Person","@id":"https:\/\/www.dataplatform.gr\/#\/schema\/person\/e87bf4fd02b65cb6aa0942f87245bbaf","name":"Stratos Matzouranis","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g","caption":"Stratos Matzouranis"},"sameAs":["https:\/\/www.dataplatform.gr"],"url":"https:\/\/www.dataplatform.gr\/en\/author\/stratos-matzouranis\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts\/3997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/comments?post=3997"}],"version-history":[{"count":1,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts\/3997\/revisions"}],"predecessor-version":[{"id":5627,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts\/3997\/revisions\/5627"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/media\/702"}],"wp:attachment":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/media?parent=3997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/categories?post=3997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/tags?post=3997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}