Comments
3 comments
-
Hi Andrew,
Thanks for your post!
Unfortunately, there is no feature in SQL Monitor to track and send alerts for specific SQL Errors.
It might be possible using a Custom Metric, but it's not a feature we've provided or tested! -
Hi there,
Thanks for your reply. I've decided to do it with a custom metric using this scrip:DROP TABLE IF EXISTS #errorLog;CREATE TABLE #errorLog(LogDate DATETIME,ProcessInfo VARCHAR(64),[Text] VARCHAR(MAX));DECLARE @starttime DATETIME = DATEADD(MINUTE, -5, GETDATE()), @now DATETIME = GETDATE()INSERT INTO #errorLogEXEC xp_readerrorlog 0,1,NULL, NULL, @starttime, @nowSELECT COUNT(*)FROM #errorLog aWHERE EXISTS(SELECT *FROM #errorLog bWHERE [Text] LIKE '%I/O requests taking longer than 15 seconds%'AND a.LogDate = b.LogDateAND a.ProcessInfo = b.ProcessInfo);DROP TABLE IF EXISTS #errorLog;
Regards
Andrew -
It'd be good to submit that to sqlmonitormetrics.com
.
Add comment
Please sign in to leave a comment.
Does anyone know a way of doing this on SQL Monitor?
Regards
Andrew