![]() ![]() It’s likely though that the recipients, body and attachments will be dynamic and produced via SQL query or procedure. With this simple format we can create emails with more static parameters. The basic usage for sp_send_dbmail allows you to specify recipients, subject, body, formatting and to attach files too. You also may need to be a member of the DatabaseMailUserRole database role. ![]() As a DBA you should be familiar with querying a table and sending results as a CSV or Excel file as an attachment as well as formatting the email using basic HTML too.įor these examples we are assuming you have configured Database Mail and can execute the “sp_send_dbmail” procedure as well as some XML and basic knowledge of HTML. This could be alerts, reminders, results from a job or reports for users. Sending emails using DBMail is one of the most common requested tasks for the DBA.
0 Comments
Leave a Reply. |