March 31, 2010 at 10:33 pm
Hello, I have multiple Database Mail Accounts. When I setup my SQL Server Agent job and in the Notifications section, I can select E-mail to some operator for certain event. The issue is how could I setup certain notification to certain DB Mail Account? For example, Job 1 should email with DB Mail Account 1 and Job 2 should email with DB Mail Account 2. Any help would be greatly appreciated. I have been scratching my head for days. Please help. Thanks!!!
March 31, 2010 at 11:23 pm
Rather than use the notifications, use an additional job step. IN that step write a query that will execute the mail send task and specify which mail profile to use. The downside to this would be an email to be sent in success and failure.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
March 31, 2010 at 11:43 pm
Hi Jason, I was hoping for an easier solution. MS Engineer created DB Mail Accounts for a reason, I would think...? 🙁
April 1, 2010 at 12:08 am
And those DB Mail accounts can be accessed and mail sent via each one through script.
Another option could be notification services, which too can use a script to send email via a specific mail account.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
April 1, 2010 at 8:31 pm
I use a trigger on the sysjobhistory table.
It sends emails to different people depending upon the job and it's completion.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply