Hi,
I am trying to create a script that does a tnsping on an oracle DB every 5 minutes by a crontab.
I know my problem relates to the crontab not being able to convert the Oracle service name.
In the crontab I have:
5,10,15,20,25,30,35,40,45,50,55,0 * * * * /library/file_transfer/scripts/OraclePing.sh
and the script looks like:
echo `date '+%m/%d/%y %H:%M:%S'` - `/appl/oracle/iofm/iofmora9i/8.0.6/bin/tnsping or123 | tail -c 93` >> /library/file_transfer/OraclePing.txt
The part that specifically fails is 'tnsping or123' as it is unable to resolve the or123 service name.
Does anyone know how I can get around this problem?
Thanks.
I am trying to create a script that does a tnsping on an oracle DB every 5 minutes by a crontab.
I know my problem relates to the crontab not being able to convert the Oracle service name.
In the crontab I have:
5,10,15,20,25,30,35,40,45,50,55,0 * * * * /library/file_transfer/scripts/OraclePing.sh
and the script looks like:
echo `date '+%m/%d/%y %H:%M:%S'` - `/appl/oracle/iofm/iofmora9i/8.0.6/bin/tnsping or123 | tail -c 93` >> /library/file_transfer/OraclePing.txt
The part that specifically fails is 'tnsping or123' as it is unable to resolve the or123 service name.
Does anyone know how I can get around this problem?
Thanks.