Any examples of "new table" or "new database" alerts?

  • Having been thrust into the DBA role recently.....I have been looking for examples of scripts or whatever it takes to monitor our sql server for creation of new tables and new databases.  If I can put an alert in place that would email me whenever a table or database is created that would make my nights much less restless

    Any help would be appreciated!

     

     

     


    New to the DBA world...thank you for your help!,

    IanR

  • Hello IanR,

    You can create DML triggers at the server/database levels. Please go through the following URL

    http://msdn2.microsoft.com/en-us/library/ms189799.aspx

    Thanks and have a great day!!!


    Lucky

  • I believe you meant to say DDL triggers:

    CREATE TRIGGER trigger_name

    ON { ALL SERVER | DATABASE }

    [ WITH [ ,...n ] ]

    { FOR | AFTER } { event_type | event_group } [ ,...n ]

    AS { sql_statement [ ; ] [ ...n ] | EXTERNAL NAME [ ; ] }

  • Excellant! Thank you!  Now to learn how to create DDL triggers

    I'll check out that link.

     


    New to the DBA world...thank you for your help!,

    IanR

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

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