SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 SQL Agent email notification
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Hommer
Aged Yak Warrior

786 Posts

Posted - 05/21/2014 :  09:52:11  Show Profile  Reply with Quote
Hi,

I am trying to figure this out, and need your help.

In this case, SQL agent sends email notification to me when it should not.

In SQL 2012 enterprise, I created this update stats maintenance plan job from SSMS.

First, I have set it up to send notification when complete.
It worked.

Then, I changed it to notify when it failed.

However, I am still receiving emails even it succeeded.

Even after I removed the notification all together and restart the agent, the email still faithfully arrive!

I saw it in here

use msdb
go

select * from dbo.sysmaintplan_plans pln
join dbo.sysmaintplan_subplans spln on pln.id = spln.plan_id
join dbo.sysjobs job on spln.job_id = job.job_id
where pln.name ='Update statistics'

and here
Select * FROM [dbo].[sysmail_mailitems]

As you can tell, it is not a major issue, but it bothers me in a production box, that it acts the way it is not supposed to.

I understand some of you have said maintenance plan is not good in many regards.

Thanks!

tkizer
Almighty SQL Goddess

USA
37133 Posts

Posted - 05/21/2014 :  12:22:14  Show Profile  Visit tkizer's Homepage  Reply with Quote
I would delete the maintenance plan and then set it up again. Alternatively, you can roll your own update stats job.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000