|
|
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.
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.
The script I used to set the default profile I found here.
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.
Please wait...

Please wait...




You must be Loged On to make a comment.