In one of my old posts, I tried to explain how to create AWR and ADDM reports by PL/SQL and send them as email. One of my reader asked me how to run them in RAC environment. As I see, my script for ADDM is already compatible but AWR was not, so I added 1-2 lines to make it compatible, and wanted to share it:

It sends one email for each instance. So you get 3 emails if you have 3-node RAC. It doesn’t seem quite right to me, so I modified the code to send these reports as attachments in one mail:

I hope that PL/SQL script will be helpful, at least it demonstrates how to send attachments in emails. 🙂

9 Responses to “Create AWR Reports and Send Them via Email (RAC Compatible)”

  1. Sergey Golikov says:

    Good job, Gokhan! Big thanks!

  2. good scripts.please post the script for single instance database


  3. Thanks Gokhan for sharing. Using your proc, I have written for ASH report:

  4. Nice post Gokhan. works like a charm. Keep the spirit.

  5. Hello,

    Very nice script, can we put multiple email ids v_recipient ..



    • Gokhan Atil says:

      Hi Anuj,

      Add UTL_SMTP.RCPT (v_mail_conn, v_recipient) multiple times, and also add the email address with comma to the “TO” string.


  1. Log Buffer #286, A Carnival of the Vanities for DBAs | The Pythian Blog - [...] Gokhan Atil is creating AWR reports and sending them via email. [...]

Leave a Reply

Your email address will not be published. Required fields are marked *