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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maintenance Plan Notification email with Details

Status
Not open for further replies.

mdwu

Technical User
Jul 17, 2003
98
US
I have setup maintenance plan for my sql 2005 server and I am receiving the notifcation email when it's completed. However, does anyone know how to get the email to include what was actually done in details. I know this can be done and i have seen it before. Thanks. for the help.
 
In the Notify Operator Task of the maintenance plan, there is a "Notification Message to send" area. I'm not sure if you'd place it there or not.

Though, you might be able to execute your plan as a T-SQL stmt task and then save the output to a Temp table, then stick that info into the Notification Message spot.

I haven't done this before, so I'm just guessing.



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Edit the Maint plan. On the last tab is an option to have the plan email the report file the it creates to an Operator. You can then remove the notification from the job as getting the email will handle this for you.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Thanks for the reply, but you guys didn't really address my problem. As for Cataadmin, your suggest would require manual process everytime which kill the whole point of having auto notify. As for mrdenny, I don;t have notification setup within the plan, I am using the operator to handle the email. Thanks anyway.
 
Denny is talking about the plan itself, not the Notify Operator task. Look for the Logging button in the plan. There's an option to send the report to an email recipient. That should do what you need.



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
cataadmin,

You hit the spot. However, I am still not getting the detail logging. Below is an example of the email that I got. Any ideas.

JOB RUN: 'DB Maintenance' was run on 1/10/2007 at 5:08:28 PM
DURATION: 0 hours, 0 minutes, 6 seconds
STATUS: Succeeded
MESSAGES: The job succeeded. The Job was invoked by User server1\Administrator. The last step to run was step 1 (Subplan).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top