May 24, 2009 at 6:47 pm
Hi
I am having trouble with a particular SQL 2005 server, where scheduled job notifications aren't working.
Database mail is enabled, and I can successfully send a test email using the "Send Test Email..." option for database mail in SSMS, and using the following command:
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'Admin',
@recipients = 'user@example.com',
@body = 'This is a test',
@subject = 'Test email' ;
I have enabled the mail profile for SQL Server agent
* Mail system: Database Mail
* Mail profile: Admin
But the notifications for scheduled jobs are not working.
The Email notification settings for jobs are set to send an email when the job completes. But after the job finishes I don't receive any email notification.
How can I test that the Operators are configured properly?
May 24, 2009 at 7:05 pm
Fixed!
I restarted the SQL Server Agent service, and job notifications are now working.
Because SQL Server Agent caches profile information, SQL Server Agent does not immediately use new information when the profile changes. After changing the e-mail system, you must restart the SQL Server Agent service for the change to take effect.
http://msdn.microsoft.com/en-us/library/ms190606(SQL.90).aspx
I did not restart the server or the SQL Server Agent service since I finished installing SQL server, so when I setup and configured the database, including database mail, the SQL Server Agent did not have a cached copy of the mail profile.
This is why the job notifications were not working.
May 24, 2009 at 7:50 pm
Thanks for posting the solution and a link - I know it will help somebody else out in the future.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply