i am running a perl script which query from a Oracle db. In event the db is down or password expired, my script will hang. To prevent this, i would like to have a checking on the db connection before my other scripts execute.
i have tried the following but it will hang:
$CHECK_DB = system ("sqlplus -s username/password\@dbname >> /dev/null + 2>&1"); if ( $CHECK_DB eq 0 ) { print LOG "Msg: DB link up\n"; } else { print LOG "Msg: DB link down!\n"; }
It doesnt seems to be working. Is there any other method?
Cheers Mate...
In reply to Test Oracle connection by darrengan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |