locked
RDS instance send DAtabase Mail RRS feed

  • Question

  • following error still occurred when a stored procedure tried to send Database email.This is an RDS instance

    The EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo'.



    Kiran

    Wednesday, May 22, 2019 6:33 AM

Answers

  • You have to grant permissions for the used Login, see sp_send_dbmail (Transact-SQL)

    Olaf Helper

    [ Blog] [ Xing] [ MVP]


    Wednesday, May 22, 2019 6:52 AM
  • If there is any thing RDS-specific here, you will need to ask in a forum devoted to RDS.

    But apart from that, only posting an error message without telling us what you did, is not the best way to get help with your problem. But my guess is that you were not in msdb when you ran the GRANT command.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

    Wednesday, May 22, 2019 9:45 PM

All replies

  • You have to grant permissions for the used Login, see sp_send_dbmail (Transact-SQL)

    Olaf Helper

    [ Blog] [ Xing] [ MVP]


    Wednesday, May 22, 2019 6:52 AM
  • which login?

    Kiran

    Wednesday, May 22, 2019 7:11 AM
  • That one that runs the stored procedure, which sends the DB mail.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Wednesday, May 22, 2019 12:53 PM
  • Cannot find the object 'sp_send_dbmail', because it does not exist or you do not have permission

    Kiran

    Wednesday, May 22, 2019 1:09 PM
  • Please note that it is an RDS instance

    Kiran

    Wednesday, May 22, 2019 1:12 PM
  • If there is any thing RDS-specific here, you will need to ask in a forum devoted to RDS.

    But apart from that, only posting an error message without telling us what you did, is not the best way to get help with your problem. But my guess is that you were not in msdb when you ran the GRANT command.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

    Wednesday, May 22, 2019 9:45 PM