Feature request - alert new/deleted databases
oderks
Posts: 67 Bronze 2
With applications like MOSS and such we currently have some instances with application users in db_creator role
I'd really like to be alerted/notified when a new database is created. In my case not so much for 'knowing someone added a new database', but more for the planning of necessary follow-up actions like adjusting reserved space, check if backup plans are sufficient and such.
I'd really like to be alerted/notified when a new database is created. In my case not so much for 'knowing someone added a new database', but more for the planning of necessary follow-up actions like adjusting reserved space, check if backup plans are sufficient and such.
Comments
Thanks for your feedback. We are tracking it as SRP-1268.
Regards,
Priya
Project Manager
Red Gate Software
I don't know if you are still using SQL Monitor and if so are aware of the new Custom Metrics feature? It's purpose is exactly for this type of alert.
I had a quick play and came up with the following T-SQL that you can use in a custom metric which would then force an alert if a new DB was created.
SELECT
CASE
WHEN create_date >= DATEADD(d, -1, GETDATE()) THEN 1
ELSE 0
END
FROM sys.databases
WHERE database_id = DB_ID()
If you create the custom metric and run it against "All User Databases" and then set up an alert if the value goes past "0" then this will alert for new databases created in the last day.
I appreciate this may not make sense if you haven't used the custom metrics feature, in which case I encourage you to check out the information on this feature in our support center.
http://www.red-gate.com/supportcenter/C ... 469829.htm
Hope that's of some help.
Fiona
Will also check if it's possible to alert on deleted databases.