I am in process of setting up job failure notification and one of the requirements that I have is to send notification to multiple users. I would appreciate any suggestion. One of the possible ways would be to create some sort of group account on exchange server with all users added as members. Is there anyway though where I could use users' individual accounts and based on that forward notification to them?
Thanks
Which version of sql server is this?
In SQL Server 2005 you can use Database Mail - http://www.sqlserverclub.com/articles/article05.aspx
In SQL Server 2000 try SQL Mail - http://support.microsoft.com/kb/263556
and also you can send mail using SP_OACreate SP
Refer : http://www.sqlteam.com/article/sending-smtp-mail-using-a-stored-procedure
Madhu
|||Madhu,
I am sorry for not mentioning in advance that I am using Database Mail in SQL Server 2005 and that is why I am wondering how I could send notification to multiple users from job failure. As I understand using Profile would send email to only one of the accounts listed in that profile. I am quite familiar with Database Mail and I have been using it successfully for almost a year now.
|||Without creating distribution list or group recipient from Exchange Server, I couldn't find any other way to send job failure notification to multiple people. My solution was to create a procedure that collects history of failed job and add it as a last step to my jobs so that whenever job failed it would execute that last step. Within that procedure I used sp_send_dbmail with a list of users email addresses. Solution seem to work brilliant.
No comments:
Post a Comment