Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.
sp_send_dbmail returns blank email while runs in a job step!

已答覆 sp_send_dbmail returns blank email while runs in a job step!

  • sabato 18 agosto 2012 15:48
     
     

    Hi, 

    I have a query and I want to be emailed in scheduled job.

    My query is worked fine. I put my query and the sp_send_dbmail with filled @body parameter into a Stored Procedure.

    Executing mentioned SP is error free and I can receive my email with full result of that query.

    But when I put this SP into a job, it sends only a blank email!

    I am sure the cause of this problem is related to the SQL Server Agent service user. My SQL Server Agent is set to NT AUTHORITY\SYSTEM and if I change it to Domain\administrator the result email will be full and correct but for other related services and mirroring I can't change it for ever.

    I also test it with "run as " parameter and I put in the bigger hole with new errors and security alerts...

    Can you guide me about the further security needs for NT AUTHORITY\SYSTEM as SQL Server Agent user? (Its current role is set to sysadmin)

Tutte le risposte