Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Database Link Timer (oh, one more thing)

RE: Database Link Timer (oh, one more thing)

From: Shawn Ferris <shawn_at_virtualsmf.net>
Date: Thu, 24 Jun 2004 15:30:19 -0600 (MDT)
Message-ID: <8614.168.215.22.23.1088112619.squirrel@mail.virtualsmf.net>


> http://www.oreilly.com/catalog/oracleperl/pdbatoolkit/

You could "try" some variation of this.. I do use this code, and it seems to work.. YMMV

  #!/bin/ksh

  me=$$

  # Ping the database
  ( ping_database.sh -s ORACLE_SID ) &
  pingproc=$!

  (
    # Sleep for 60 seconds.. set it accordingly     sleep ${TIMEOUT:-60};
    echo "Timed out waiting for ping to complete. Please check for " \

         "defunct processes: (pingproc: ${pingproc}, me: ${me})";     ps -f;
    kill -TERM ${pingproc} ${PPID} ${me} $$ >/dev/null 2>&1;   ) &
  sleepproc=$!

  # Don't wait for the sleep.. or else it wont be cleared later   # (and fail everytime)
  wait ${pingproc};

  # This will (hopefully) clear out the sleep counter if the ping returns   # before the sleep completes.
  kill -9 ${sleepproc}



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Thu Jun 24 2004 - 16:16:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US