cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 9

Create an alert when a Database has been updated

I have DPA and I thought this alert would be easy to create but cannot seem to figure out how to create an alert that, whenever a table is updated, it sends an alert.  

We have a database table that ONLY gets written to when a specific error happens.  

Anyone have any thoughts?

Labels (1)
0 Kudos
3 Replies
Level 13

Hi, not sure it can be done in DPA. My tool of choice would be SAM. There you can create any SQL query against the db you are monitoring. 

Create a query that shows how many new rows you got in the last timeframe you want. Or use the link @mesverrum gave to look at the table itself

Remember that you have to return 0 even if you don't get any hits. NULL is not allowed.

0 Kudos

Probably need to do it as a custom metric or custom alert, this query could be a starting point

https://blog.sqlauthority.com/2009/05/09/sql-server-find-last-date-time-updated-for-any-table/

datediff that value and alert any time it is below 10 or so?

- Marc Netterfield, Github

I used this exact method with a custom alert in DPA to alert if a table hasn’t been updated within a specified amount of time. Requires a bit more logic wrapped around it but that’s at the core of it and it works very well. Could easily be flipped the other way to check if it has an update too.

DPA or SAM are the ideal tools for this.
0 Kudos