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

Alerting on new and dropped databases

Jump to solution

Is there a way to monitor for databases that are either dropped or added?  Using SolarWinds DPA 2019.4.1054 for SQL Server.

Labels (1)
0 Kudos
1 Solution
Product Manager
Product Manager

Hi Tony,

In DPA you can create custom alerts and even custom metrics. In Thwack page for DPA, search for “custom alert” and you can see a lot of examples.

Some quick thoughts:

As far as newly created databases, you could base it on a query like:

select as database_name,create_date

from sys.databases

where(convert(date,create_date) = convert(date,GETDATE()))

order by name

For dropped databases, a little bit more complicated – might look at this SQL Authority Blog: https://blog.sqlauthority.com/2015/09/12/sql-server-who-dropped-table-or-database/ I suspect you can also retrieve the time the table was dropped and do a similar comparison for the alert like the create above.

If not or as an alternative, you could go with a variant of this custom alert https://thwack.solarwinds.com/docs/DOC-172886 article and store yesterday’s list of DBs in a table, and store today’s list in a second – then query to identify any rows in yesterday’s that don’t exist in today’s.

Thanks,

Chuck Priddy

Chuck Priddy | Senior Product Manager – Systems Management


Database Performance Analyzer (DPA)

Success Center

View solution in original post

3 Replies
Level 9

cpriddy​ when I navigate to the 2nd URL (https://thwack.solarwinds.com/docs/DOC-172886) I get a message stating "Access to this place or content is restricted. If you think this is a mistake, please contact your administrator or the person who directed you here. "

0 Kudos
Product Manager
Product Manager

Hi Tony,

In DPA you can create custom alerts and even custom metrics. In Thwack page for DPA, search for “custom alert” and you can see a lot of examples.

Some quick thoughts:

As far as newly created databases, you could base it on a query like:

select as database_name,create_date

from sys.databases

where(convert(date,create_date) = convert(date,GETDATE()))

order by name

For dropped databases, a little bit more complicated – might look at this SQL Authority Blog: https://blog.sqlauthority.com/2015/09/12/sql-server-who-dropped-table-or-database/ I suspect you can also retrieve the time the table was dropped and do a similar comparison for the alert like the create above.

If not or as an alternative, you could go with a variant of this custom alert https://thwack.solarwinds.com/docs/DOC-172886 article and store yesterday’s list of DBs in a table, and store today’s list in a second – then query to identify any rows in yesterday’s that don’t exist in today’s.

Thanks,

Chuck Priddy

Chuck Priddy | Senior Product Manager – Systems Management


Database Performance Analyzer (DPA)

Success Center

View solution in original post

Thanks for the info cpriddy  I'll dig into this tomorrow!

0 Kudos