May 9, 2019 at 7:04 pm
I want to create a custom SQL Agent Alert for whenever a stack dump occurs. However I can't seem to determine what the stack dump error number is (for example Error 1205 Deadlock Detected) or what severity level (001 - 025) it would be. Does anyone know?
May 9, 2019 at 8:24 pm
There isn't a specific error number for stack dumps. Have you considered doing something like monitoring sys.dm_server_memory_dumps? There is a row in the view every stack dump that is generated by SQL Server. You can use a job to poll the view and send an email if it finds new rows.
Sue
May 9, 2019 at 8:57 pm
Yeah, we tried an INSERT trigger on that DMV but apparently you can't put a trigger on a DMV. 🙁
May 9, 2019 at 9:12 pm
No you can't put a trigger on it but I don't think would need an insert trigger. That's why you would poll the view. If nothing else and you aren't going to delete anything in the view, you could track the last time the view is checked in some admin table and on each check just use greater than last check time for the creation_time in the view. If you do that in a job and records exist then send an email.
Sue
September 17, 2020 at 11:06 pm
If I have more than 50 servers do i need to create the Job in all 50 servers?
September 17, 2020 at 11:32 pm
Is it good to run every 15 mins?
September 18, 2020 at 12:10 am
If I have more than 50 servers do i need to create the Job in all 50 servers?
No. Look for Get-DBADump at the following link. It's part of the infamous DBATools collection of PowerShell driven tools.
The following appears to be a post on how to use it against multiple servers.
https://www.powershellgallery.com/packages/dbatools/0.9.832/Content/functions%5CGet-DbaDump.ps1
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply