question

Jka avatar image
Jka asked

How to send email in SQL server Azure

I am getting the following error ‘Could not find stored procedure 'sp_send_dbmail' when I am trying to fire a SP proc and send an email to an operator ***@****.com( Sample) using SP_Send_Dbmail. When I checked again I see we are working in Azure and does not see the MSDB. How can I fix the issue or error so that I can send the email to operator which I want. Thanks.

sql server 2017azure sql db
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Azure SQL Database? Yeah, I don't think that's possible. However, you might be able to achieve something similar by getting your SP to write into a table, and then having an external task (eg SSIS) running against that table to generate the email...

0 Likes 0 ·
pituach avatar image
pituach answered

Good day,

sp_send_dbmail is not supported in Azure SQL Database (it is supported in Azure Managed Instance and SQL Server on VM), but you can use Azure SendGrid for the task.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

rk_tech avatar image
rk_tech answered

Is it possible to send email from runbook using powershell script? I would like to receive email when runbook generates errors.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.