Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Database Link Timer (oh, one more thing)
> 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}
-- 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
![]() |
![]() |