What are the challenges you face when working across database platforms? Take the survey

Feature request - alert new/deleted databases

oderksoderks Posts: 67 Bronze 2
edited April 20, 2012 3:37AM in SQL Monitor Previous Versions
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.


  • Options

    Thanks for your feedback. We are tracking it as SRP-1268.

    Priya Sinha
    Project Manager
    Red Gate Software
  • Options
    I appreciate this is an old forum post, but I came across it whilst reviewing open bug reports.

    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.

    WHEN create_date >= DATEADD(d, -1, GETDATE()) THEN 1
    ELSE 0
    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.
    Project Manager | Redgate Software
  • Options
    oderksoderks Posts: 67 Bronze 2
    Thanks. I've seen the feature in SQL Monitor 3 and will plan an update soon as we are running 2.3
    Will also check if it's possible to alert on deleted databases.
Sign In or Register to comment.