SQL Server Email Alerts Notifications

Then send the email to the desired recipients. In order to do this  we need to create a Database Mail Profile. More details on How to create a Database Mail Profile can be found in the Books Online.

exec msdb..sp_send_dbmail @profile_name = ‘Profile Name’
,@recipients =’Email Address’
,@subject = @mail_subject
,@body = @mail_body
,@body_format = ‘HTML’
,@importance = ‘High’
set @j = @j+1
end

drop table #alert_message
drop table #replicationalerts
drop table #subscriber_alert_message

That’s it, now you will have a much more user friendly email alerts notification system.

Download the full listing of Step 2 here

Pages: 1 2




Array

No comments yet... Be the first to leave a reply!