Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql 2005 Maintenance Plans - Email Notification

Status
Not open for further replies.

paulovey

Technical User
Jul 13, 2000
458
0
0
GB
Hi,

I hope someone can help.

I am trying to configure a new 2005 SQL server to email an external address when the maintenace job fails.

I have created am operator and tested emails to that address from SQL, and they are received fine.

I have also edited the maint plan under

SQL Server Agent
Jobs
Maint Sub Plan

Right clicked here, goto to properties. And then under notification choose the operator I added.

But when the job compeletes it is not emailing me. I have tested with both the maint plan working and failing.

But still no luck..... What have I missed???

TIA

Paul


If aint broken, dont try n fix it!!!!!
 
You want to set the notifications for the whole job not the job step.

Right click on the job and select properties.
Select Notifications. Select the Email action.

- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
Hi,

Thank you, for the response. But I have set the notifications on the whole job.

Sorry, probably my bad explaining, in mentioning "subplan".

Paul

If aint broken, dont try n fix it!!!!!
 
Did you set for when job completes, fails or succeeds?

Also have you checked the Database mail log?
Check all the logs. SQL Agent and Server logs.
Have you tried to send an email from another job? Is it only maint plan jobs that fail?

When you sent your test did you right click on Database mail and select send test email? Is your mail profile public or private?

- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
OK,

1. I have set to send a email when the job succeeds, and the jobs are completing successful.

2. The database mail log has 6 entries in it, 3 saying shutting down, 3 saying its starting up. These co-encide with the test emails sent

3. All plans are working, I have not tested from other jobs as yet, as this the only one that needs a email notification.

4. Test email was sent Via..

-Right Click Database Email
-Send test email
-Choose same profile as in the maint plan

5. As for the profiles being public or private, heres where im a bit confused,and may be the problem. I have entries for both users in the public and private tabs. Both boxes are ticked. And probably quite important default=no on all of them.





If aint broken, dont try n fix it!!!!!
 
a private profile can only be accessed by the user you specify. I have my default mail profile set up to be public. That is the one that the SQL Agent uses.

- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
I have the same problems here - working fine but won't email me when the job is complete. Anything else?
 
Try logging onto the sql server machine with the profile that the e-mail will run so the server and then log off so it can establish its email profile.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top