Alerts on Mobile/Pager
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: Alerts on Mobile/Pager

  1. #1
    Join Date
    Feb 2001
    Location
    UAE
    Posts
    304
    I have Oracle 8.1.6 on Sun Solaris. I want to implement the messaging. If there is any problem in the database, I want to send an alert either on the mobile or the pager. How can I implement this?
    Agasimani
    OCP(10g/9i/8i/8)

  2. #2
    Join Date
    Mar 2001
    Posts
    188
    Hey
    i have implemented such as an email will send me and my provider send it to my phone.
    If you are interested in such give me our email and i will send it to you.
    I'm also interested in an procedure that send a sms to my phone or pager. Gives there a solution ????

    Regards
    Thomas Schmidt

  3. #3
    Join Date
    Feb 2001
    Location
    UAE
    Posts
    304
    Can you please send me the details on agasi123@hotmail.com? I have no idea as how to send the SMS to the mobile. If somebody out here can help us, That would be great.


    Thanks and Cheers
    Agasimani
    OCP(10g/9i/8i/8)

  4. #4
    Join Date
    Jan 2001
    Posts
    61
    Could you please also send me the same script at
    r_sonakiya@hotmail.com

    Thanks


  5. #5
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Thomas,

    If you don't mind and if the script that you proposed is small, could you post it on this forum, that way you could reduce the hassel of sending the emails to each and every request and keep this thread under control.

    BTW, folks if you are using the OEM, it has the feature that enables you to send any alerts to your pager. Check the gate way configuration under preferences in OEM.

    Thanx for the corporation.
    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  6. #6
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    #!/usr/bin/ksh
    # Created by: Tamilselvan
    # Date: 11-Aug-2000
    # Sun Solaris 2.6
    # File: db_running.sh
    #
    # Description: This script checks all the background
    # processes are running and also
    # tnslsnr
    # If not, send page to DBAs
    #

    ###################################
    #Set Parameters
    ###################################
    ORACLE_SID=XXXX
    export ORACLE_SID
    ####################################
    # Test To Verify Database Is Running
    ####################################

    PMON=`ps -fu oracle | grep ora_pmon_"$ORACLE_SID" | grep -v grep`
    DBW0=`ps -fu oracle | grep ora_dbw0_"$ORACLE_SID" | grep -v grep`
    LGWR=`ps -fu oracle | grep ora_lgwr_"$ORACLE_SID" | grep -v grep`
    SMON=`ps -fu oracle | grep ora_smon_"$ORACLE_SID" | grep -v grep`
    CKPT=`ps -fu oracle | grep ora_ckpt_"$ORACLE_SID" | grep -v grep`
    RECO=`ps -fu oracle | grep ora_reco_"$ORACLE_SID" | grep -v grep`
    ARC0=`ps -fu oracle | grep ora_arc0_"$ORACLE_SID" | grep -v grep`
    TNSL=`ps -fu oracle | grep tnslsnr | grep -v grep`

    if [ -n "$PMON" -a "$DBW0" -a "$LGWR" -a "$SMON" -a "$CKPT" -a "$RECO" -a "$ARC0" -a "$TNSL" ]
    then
    echo " " >/dev/null
    else
    echo "!!! URGENT !!! One of the background processes failed for $ORACLE_SID database."|mailx
    -s "ATTENTION DBAs" 877101010@skytel.com 877101020@skytel.com
    exit 1
    fi
    exit 0


  7. #7
    Join Date
    Mar 2001
    Posts
    188
    hi there,
    for install send mail following must be installed.

    1) connect as sys user
    2) run %Oracle_Home/javavm/plsql/jlib/initjvm.sql
    3) run %Oracle_Home/rdbms/java/install/initplsj.sql
    4) Configure the smtp-server

    5) look that package utl_smtp is installed

    6) For all big problems i call the procedure and give so me an info whats wrong in the db

    CREATE OR REPLACE
    PROCEDURE sendmail (
    mail_server IN VARCHAR2,
    sender IN VARCHAR2,
    recipient IN VARCHAR2,
    subject IN VARCHAR2,
    message IN VARCHAR2)
    IS
    c utl_smtp.connection;
    mesg VARCHAR2( 4000 );
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );

    BEGIN
    c := utl_smtp.open_connection(mail_server);
    utl_smtp.helo(c, mail_server);
    utl_smtp.mail(c, sender);
    utl_smtp.rcpt(c, recipient);
    mesg:= 'Date: ' || TO_CHAR(SYSDATE, 'dd Mon yy hh24:mi:ss');
    mesg:= mesg || crlf;
    mesg:= mesg || 'From: ' || sender || ' <' || sender || '>';
    mesg:= mesg || crlf;
    mesg:= mesg || 'To: ' || recipient || ' <' || recipient || '>';
    mesg:= mesg || crlf;
    mesg:= mesg || 'Subject: ' || subject;
    mesg:= mesg || crlf;
    mesg:= mesg || '' || crlf || message;
    utl_smtp.data(c, mesg);
    utl_smtp.quit(c);
    EXCEPTION
    WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
    utl_smtp.quit(c);
    raise_application_error(-20000,
    'Failed to send mail due to the following error: ' || sqlerrm);
    END;
    /

    Regards
    Thomas
    Best Regards
    Thomas Schmidt

    Thomas_Schmidt@eplus-online.de
    If you have no aims, you will never reach a goal !!!

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