Alert for New Database

  • What's the best way to receive an alert if someone creates a new database?

    A "Creating file" statement is generated in the error log but it's not actually an error so I can't generate an alert from it.

    I suppose i could have a table that holds all the current db names and periodically check against this but I was hoping for something a little smoother.

    cheers

  • Hi,

    I dont' know is this is a good idea but what about creating a trigger on the sysdatabases table in the Master Database...

    If it aint broke don't fix it!


    Andy.

  • Comparing the names is good and simple. Not as thrilled about the trigger. Its the "right" solution, but you can't always depend on MS to fire triggers on system tables plus it may get lost in the next service pack or whatever. The other way would be to profile, look for the event. Lumigent's Entegra might help you there. Not sure if there is a true alert that would fire, worth investigating.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply