DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: email the errors on the alert log file on NT

  1. #1
    Join Date
    Jan 2002
    Posts
    474
    Hi all,

    I have the procedure and Oracle jserver intalled on my machine, I did excute the procedure and everything work fine. The question I have is how to automate this task to send me an email when there is an errors on my alert log file.

    below is my procedure:



    CREATE OR REPLACE PROCEDURE HOUSTON.send_mail (p_sender IN VARCHAR2,
    p_recipient IN VARCHAR2,
    p_message IN VARCHAR2)
    as
    l_mailhost VARCHAR2(255) := 'my computer';
    l_mail_conn utl_smtp.connection;
    BEGIN
    l_mail_conn := utl_smtp.open_connection(l_mailhost, 25);
    utl_smtp.helo(l_mail_conn, l_mailhost);
    utl_smtp.mail(l_mail_conn, p_sender);
    utl_smtp.rcpt(l_mail_conn, p_recipient);
    utl_smtp.open_data(l_mail_conn );
    utl_smtp.write_data(l_mail_conn, p_message);
    utl_smtp.close_data(l_mail_conn );
    utl_smtp.quit(l_mail_conn);
    end;
    /

    Please advise me of how to send me an email when there is an errors on my log.

    Thanks



  2. #2
    Join Date
    Nov 1999
    Posts
    226

    sending Oracle Errors mail on UNIX

    Hi

    What we do here is

    $ Grep ORA- alert.log >> alert_temp.log
    $ Mail alert_tmp.log mail@com
    $ Delete Alert_tmp.log

    See if this makes sense

    Make into a .sh file and run with proper locations and customize for NT

    regards

  3. #3
    Join Date
    Jan 2002
    Posts
    474
    I am sorry, I don't get it.

    I am running on NT please give me more details.
    thanks

  4. #4
    Join Date
    Aug 2001
    Posts
    75
    Use CYGWIN(www.cygwin.com) which is Unix on Windows. You will get the power of full shell scripts.

    Sanjay
    OCP 8i

  5. #5
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Originally posted by ashley75
    Hi all,

    I have the procedure and Oracle jserver intalled on my machine, I did excute the procedure and everything work fine. The question I have is how to automate this task to send me an email when there is an errors on my alert log file.

    I managed to implement that. Moreover, I made it so that if the alert.log has an error (ORA-XXXXX), then Oracle sends this line to me as an SMS message to my mobile phone.

    If you want to know how it works, send me an email. I will give you the instructions and the procedures you need for that.

    I did all only with Oracle tools. No OS scripts, etc.

    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g,12c
    email: ocp_9i@yahoo.com

  6. #6
    Join Date
    Mar 2002
    Posts
    301
    HI,

    Julian, Can u pls. send me the script. I think you have not sent it to me.

    Vijay.
    Say No To Plastics

  7. #7
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Originally posted by oravijay
    HI,

    Julian, Can u pls. send me the script. I think you have not sent it to me.

    Vijay.
    What is your email? I have received so many requests that I will post tomorrow here all the instructions.

    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g,12c
    email: ocp_9i@yahoo.com

  8. #8
    Join Date
    Jan 2002
    Posts
    474
    Thanks Julian,

    my email is MYORACLEBACKUP@YAHOO.COM


    Thanks so much

  9. #9
    Join Date
    Dec 2001
    Location
    USA
    Posts
    620
    Hi Julien,

    Can you pl. send it to me also?

    Email Add: sshah1001@hotmail.com

    Thank you very much.

    Sam
    ------------------------
    To handle yourself, use your head. To handle others, use your heart

  10. #10
    Join Date
    Sep 2000
    Posts
    77
    Julian,
    Can you please send me the script.
    my email - dchalavadi@hotmail.com
    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width