6 Replies Latest reply: Sep 4, 2013 11:54 AM by JohnWatson RSS

    listener

    988731

      Is it possible to set alert on listener, if it gets down?

      I mean..If Listener status gets down how would DBA know (except lsnrctl status)?

        • 1. Re: listener
          JohnWatson

          Just the other day I had to do this.

          I wrote a little stored Java procedure that attempts a logon through the listener, and raises an alert if it fails. Schedule this to run as frequently as you want. I can't give away the code on a public forum, but I'm sure you can develop your own. Or contact my boss.

          --

          John Watson

          Oracle Certified Master DBA

          • 2. Re: listener
            AlexandarVu

            If your database is on Linux OS(or write something similar for Windows OS)...

            You could set up cron job to check periodically if listener process exists.

            For example

            ps -fu oracle | grep lsnr | grep /home/oracle/

            result=$?

            if [[ $result = 0 ]] ; then

                 echo "running" # do nothing

            else

                 echo "not running" # send mail for example

            fi

             

            Instead of /home/oracle/ type part of your oracle home for example.

            Listener is running from $ORACLE_HOME/bin.

            • 3. Re: listener
              Billy~Verreynne

              988731 wrote:

               

              Is it possible to set alert on listener, if it gets down?

              I mean..If Listener status gets down how would DBA know (except lsnrctl status)?

              Why would a Listener fail?

               

              And the reason for that, also very likely means the inability of any other software on that server using the network interface on that platform to notify you of the error.

               

              If you want listener redundancy and failover - look at how SCAN and local listeners and virtual IP addresses work.

              • 4. Re: listener
                sybrand_b

                One would expect an OCM would explain that database control is already doing this, and this is one of the reasons to use database control.

                Writing a Java procedure to do this instead of using software you already get (and pay for) is sad.

                 

                -------------

                Sybrand Bakker

                Senior Oracle DBA

                • 5. Re: listener
                  sybrand_b

                  Database control (which is included in Oracle RDBMS and which you pay for) already does this, standard.

                   

                  -----------

                  Sybrand Bakker

                  Senior Oracle DBA

                  • 6. Re: listener
                    JohnWatson

                    One would expect that a soi-disant Senior Oracle DBA would explain that using Enterprise Manager to send notifications requires licensing Enterprise Edition plus the Diagnostic Pack.

                    --

                    John Watson

                    Oracle Certified Master DBA