How to create a procedure to send a mail if the Database is down?
620516Feb 15 2011 — edited Feb 16 2011Hi,
I have created the below procedure to send a mail if the count is less than 1300. It scheduled daily @ 15 30 hrs. Its fine.
CREATE OR REPLACE procedure SCOTT.hrsmail
is
v_count number;
begin
Select count(*) into v_count from emp;
if v_count < 1300
then
UTL_MAIL.send(sender => 's@n.org',
recipients => 's@y.com',
cc => 's@a.com',
bcc => 's@h.com',
subject => 'Testing the UTL_MAIL Package',
message => 'If you get this, UTL_MAIL package
else
null; --what you want to do here
end if ;
end;
/
Sometime the Database is down, so the job is not running.
How to create a procedure to send a mail if the database is down?
Pls help me. Its highly appreciated.
Thanks
Nihar