Database mail helps administrators know when something went terribly awry on a SQL Server, like corruption, a failed restore, or the system’s about to go offline due to a serious issue. It doesn’t catch everything, but if you configure it right, it’ll give you a quick heads-up about most common issues. Let’s cover how to set it up.

In the video, I cover these queries:

And:

 

4 Comments. Leave new

  • Thanks for the course on the Fundamentals of DB Admin….I’m learning a lot.

    Just as an FYI, I noticed a missing quote in the first query in the Sending Email with DB Mail section…

    SELECT is_broker_enabled
    FROM sys.databases
    WHERE name = ‘msdb;

    Reply
  • For those that want a ready-made TSQL script to configure Database Mail, I posted a script I wrote forever ago that I’ve used for each of the SQL Servers I managed at the job I had then and all the jobs I’ve had since then.

    All the cool kids are using PowerShell now, and it’s what Brent recommends, but this is something you can use for now to avoid dealing with all those dialog boxes: https://m60freeman.blogspot.com/2011/11/configure-database-mail.html.

    If anyone writes a PowerShell equivalent (or better), please post a comment here or on my blog post as I’d love to see it.

    Reply
  • camila.henrique
    November 18, 2020 8:19 am

    A friend of mine is an accidental DBA, and does not know the password to the account used for the DB email. Now, this password can be reset, but the other option is to create a new email account. Which one of these options should my friend choose?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

Menu