• I really appreciate this script. Your script was mentioned in the discussion about dbWarden, so I came looking for it. While learning it and putting it to use I hit a couple bumps that I figured other might run into.

    1. I was not familiar with SSMS templates and Ctrl+Shift+M to fill them in. A brief comment would have kept me from wondering why the script had those strange constructs while I fiddled with filling in our specific details.

    2. The script initializes @operatorname twice while missing @displayname.

    3. In the SQL for sending a test email, the script has a template field again instead of using @testemailto. This kept me scratching my head waiting for an email to arrive since it didn't cause an error to be reported.

    4. For use with dbWarden, I added a conditional around creating the operator since dbWarden creates operators for it's own use.

    I will definitely keep track of this script.

    Thanks again.

    Kelly