Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am confused about Database mail profiles in SQL Server 2008 R2. When setting up severity notifications as well as "notify operator tasks" in maintenance plans, what determines what mail profile is used?

share|improve this question
add comment

3 Answers

Since "operators" are part of SQL Server Agent, I'm guessing it'll use whatever mail profile you've configured that to use.

To review/change it, right click SQL Server Agent in Management Studio, and choose Properties. Go to the "Alert System" page, and look for the "Mail profile" drop-down menu near the top. You may also have to check "Enable mail profile", and set "Mail system" to "Database Mail" if you haven't already.

share|improve this answer
    
Wonder if this sets the same thing as what I just posted.... –  Kyle Brandt Jan 5 '12 at 13:37
    
@Kyle_Brandt db2's answer is the one that specifies which mail profile to use for the Agent operator emails. The default option on the configuration screen that you showed allows users to execute sp_send_dbmail without specifying the profile_name parameter –  Jason Cumberland Jan 5 '12 at 20:30
add comment

Think of an operator as a destination. The database mail profile is the sender.

When you configure a database mail profile you are telling SQL what mail server to use, and what "sender" email address to use.

Operators are the people you want to notify via email.

share|improve this answer
    
But you can have multiple profiles I believe, so which profile gets used? –  Kyle Brandt Jan 4 '12 at 23:15
    
I have only ever set up one profile, and it gets used by default. Sorry. –  datagod Jan 5 '12 at 3:00
    
You can have multiple profiles and you the "sending" email doesn't have to be a real email account (DoNotRespond@yourdomain.com) does appear to be the sender, a cosmetic thing that some managers like. –  jl01 Jan 19 '12 at 16:45
add comment
up vote 0 down vote accepted

It seems the default profile is what gets used, to set the default profile:

  1. Configure Database Mail:
    enter image description here

  2. Configure Profile Security:
    enter image description here

  3. Set the desired profile to default: enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.