I want to make a procedure through which I can send email to my team mail id. Actually there are number of procedures running daily in our system. So I want to send the status of each procedure means if procedure is getting success,failed or running. If the procedure is in running state I have to show the running time in that email. And also if the procedure is failed then i have to show the error message in that email. Actually one table is present in our database in which procedure id, date, start_time, end_time, status, error desc columns are there. I shared the details below.
proc id date start_time end_time status error desc
1 6/7/2017 7/5/2017 9:55:16 AM 7/6/2017 1:36:25 AM SUCCESS
2 6/28/2017 6/29/2017 8:30:02 AM 6/29/2017 2:20:15 PM FAIL -1555 - ORA-01555: snapshot too old: rollback segment number 334 with name "_SYSSMU334_1817651691$" too small
3 7/5/2017 7/6/2017 9:34:54 AM RUNNING
As I said, I have to show all the 3 types of status in the email which is to be sent through procedure. Kindly help me regarding this.
Software/Hardware used: I am using toad for oracle software
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!