Wednesday, August 4, 2010

SQL Server Job throws error while sending mail alerts.

Some times when you enable Database Mail profile SQL Server agent will fail to send mail through SQL Server agent Jobs.
Test mails from Database mail facility goes fine but if you put any alert through SQL Server agent Job you receive folliwng error in the error log file.
"SQL2005 [264] An attempt was made to send an email when no email session has been established"
The Fix for this issue is:
1. In Management Studio, right-click on SQL Server Agent and select "Properties."
2. Click "Alert System"
3. Unclick "Enable mail profile"
4. Click "OK"
5. right-click SQL Server Agent again and select "Properties."
6. Click "Alert System"
7. Re-click "Enable mail profile"
8. Click "OK"
9. Restart SQL Server Agent.

No comments:

Post a Comment