Tuesday, November 13, 2007 7:12 PMError:
Could not generate mail report.An exception occurred while executing a Transact-SQL statement or batch.Supply either @id or @name.
I am trying to send a email when a maintenance plan completes. I selected the logging option and checked "Send report to an email recipient". I selected the recipient I created in database mail. Sending test emails out from database mail works.
Any ideas what the problem could be?
- Moved by Sethu SrinivasanMicrosoft Employee, Moderator Thursday, August 30, 2012 5:55 PM Maint plan (From:SQL Server Setup & Upgrade)
Wednesday, November 14, 2007 9:42 AMModeratorHi David,
I am not sure if this link helps anyway pls give a try refer,
http://www.sqlservercentral.com/Forums/Topic263951-92-1.aspx#bm389494 (You need to be a MEMBER to access this link)
Once you have configured database mail profiles and acccount correctly try restarting the sql server agent
Wednesday, November 14, 2007 4:49 PMJust enabled it and restarted the agent twice and computer once. No workie...
Wednesday, November 14, 2007 4:54 PMUnder the logging section for the management plan, agent operator is equal to my name. In the alert properties for the sql agent it selects the profile name that my name is under.
Is this correct?
Monday, November 14, 2011 11:00 PMI have this same error, mail is configured correctly and used in other jobs. Just doesn't seem to work for the "Send Report to an email recipient" option of Report and Logging for a Maintenance Plan.
Thursday, August 30, 2012 5:54 PMModerator
Monday, January 21, 2013 5:55 AMJust for your debugging, just create a simple maintenance plan (don't do any operation in that) and after the completion of maintenance plan use the same email profile which you have setup to send an email....Try to execute the maintenance plan and see if you still get the same error...it will help you to move to next step in troubleshooting the issue
Mark this post as answer if this resolves your issue.
Everything about SQL Server | Experience inside SQL Server -Mohammad Nizamuddin