none
Maintenance Plan Logging

    Question

  • As part of the logging facility in my backup maintenance plans, I have set the logging options to generate a text file report and mail it to an agent operator which I have set up.  The job which runs this successfully send a completion email to the same operator when the job is finished, however the text file report fails with the following message:

    Could not generate mail report.An exception occurred while executing a Transact-SQL statement or batch.No global profile is configured. Specify a profile name in the @profile_name parameter.

    I have checked the database mail and the profiles / accounts I have set up seem to work correctly.  After reading through the help I have tried running  

    EXEC msdb.dbo.sp_send_dbmail
    @profile_name = 'Test SQL DB',
    @recipients = name@domain.co.uk',
    @body = 'Test email number 2.',
    @subject = 'Test of Transact SQL Emails'

    which runs fine, but when I set the @profile_name to null it fails with the same message.

    My question is:  how do I configure my maintenance plans to use the Test SQL DB profile?

    Thanks

     

    Susan

    Tuesday, March 07, 2006 12:26 PM

Answers

  • Sorry everyone,

    I managed to figure this one out for myself, feel a bit of a chump actually.  I eventually found where to set the default mail profile in the profile security section

    Susan

    Tuesday, March 07, 2006 1:02 PM
  • I was experiencing this issue, too.  I could send a test email by right clicking database mail.  I could execute the stored proc.  Both ran fine.  I could not get the notification in the maintenance plan to work.

    It turns out I had the "Connection" property on the Notification task set to a server that did not have DBMail set up.  I changed the connection to local server and the task runs just fine.  I presume had I set up DBMail on the other server, which I don't want to do, that it would then work also.

    Hope this helps someone else fighting this issue.

    SK

    Wednesday, August 02, 2006 9:24 PM

All replies

  • Sorry everyone,

    I managed to figure this one out for myself, feel a bit of a chump actually.  I eventually found where to set the default mail profile in the profile security section

    Susan

    Tuesday, March 07, 2006 1:02 PM
  • Thanks for pointing that out. I did look at the section and noticed the profile had the “Default Profile” attribute set as “No”. The data grid seemed to me as read-only, I looked around then went chasing rabbits into bunny holes. (The obvious workaround is to include run-upon-failure Execute T-SQL Tasks calling the sp_notify_operator and excplicitly specifying the @profile_name.)

     

    Apparently, I was supposed to click into the “Default Profile” cell, which then turns into a nice dropdown. Now, that makes me feel like a chump square.

     

    Regards,

    Bella

     

    Tuesday, March 07, 2006 3:47 PM
  • I was experiencing this issue, too.  I could send a test email by right clicking database mail.  I could execute the stored proc.  Both ran fine.  I could not get the notification in the maintenance plan to work.

    It turns out I had the "Connection" property on the Notification task set to a server that did not have DBMail set up.  I changed the connection to local server and the task runs just fine.  I presume had I set up DBMail on the other server, which I don't want to do, that it would then work also.

    Hope this helps someone else fighting this issue.

    SK

    Wednesday, August 02, 2006 9:24 PM
  • Hi BellaTrenkova, I too thought the data grid was read-only and was wondering what would alter its value. This thread was very helpful.

    Monday, March 16, 2009 12:42 PM