Contributor: JonRanes

MSSql Set Email Profile Default

I was trying to make some email alerts for my subplans in my maintenance plan for backups on SQL and ran into an issue where the notification email to the operator failed because there wasn't a default profile.  The problem was that using the interface the email profile I had set wouldn't click on through to finish to make the change, the finish button was greyed out.

I Googeled and found the question was asked in other places but no one ever had an answer.

1045693c-fb2b-416c-bd71-c7a4a571a469

So I found the following script to add the profile to the default profile page.

This is the setting I wanted changed with the interface but it wouldn't set.

sqlmailprofile_2

The script I used to set the default profile I found here.

bd119e5f-0cbe-4969-a62a-ddd3481f8b81

 

And the script is

-- Grant access to the profile to the DBMailUsers role 
EXECUTE msdb.dbo.sysmail_add_principalprofile_sp 
@profile_name = 'SQL2005_Email_ProfileName', 
@principal_id = 0, 
@is_default = 1 ; 

Hope that helps someone!

P.S. You will need to restart the Agent for it to start working.

Comments refreshcmnts
You must be Loged On to make a comment.
Edit Comment

Please wait... loading

Reply To Comment

Please wait... loading