Scunningham99
Programmer
Hi
I have the following script which runs fine under the oracle user, but when i run under oracle's users crontab it does not run.
Any Ideas?
#script which is run every half hour to check instances are up in cluster
#SC 10/03/2009
instance1=`/u01/app/oracle/product/10.2.0/db_1/bin/srvctl status instance -d AUSLIVE -i AUSL1 |awk '/Instance/{print $4}'`
instance2=`/u01/app/oracle/product/10.2.0/db_1/bin/srvctl status instance -d AUSLIVE -i AUSL2 |awk '/Instance/{print $4}'`
instance3=`/u01/app/oracle/product/10.2.0/db_1/bin/srvctl status instance -d AUSLIVE -i AUSL3 |awk '/Instance/{print $4}'`
if [ "$instance1" = "running" ]
then
# /bin/mailx -s "AUSLIVE INSTANCE 1 (AUSL1) is DOWN !!!!!!!!!!" orclsupportdba@diamondresorts.com < inst1_notup.txt
echo "working" > crap
fi
if [ "$instance2" = "running" ]
then
/bin/mailx -s "AUSLIVE INSTANCE 2 (AUSL2) is DOWN !!!!!!!!!!" orclsupportdba@diamondresorts.com < inst2_notup.txt
fi
if [ "$instance3" = "running" ]
then
/bin/mailx -s "AUSLIVE INSTANCE 3 (AUSL3) is DOWN !!!!!!!!!!" orclsupportdba@diamondresorts.com < inst3_notup.txt
fi
Sy UK
I have the following script which runs fine under the oracle user, but when i run under oracle's users crontab it does not run.
Any Ideas?
#script which is run every half hour to check instances are up in cluster
#SC 10/03/2009
instance1=`/u01/app/oracle/product/10.2.0/db_1/bin/srvctl status instance -d AUSLIVE -i AUSL1 |awk '/Instance/{print $4}'`
instance2=`/u01/app/oracle/product/10.2.0/db_1/bin/srvctl status instance -d AUSLIVE -i AUSL2 |awk '/Instance/{print $4}'`
instance3=`/u01/app/oracle/product/10.2.0/db_1/bin/srvctl status instance -d AUSLIVE -i AUSL3 |awk '/Instance/{print $4}'`
if [ "$instance1" = "running" ]
then
# /bin/mailx -s "AUSLIVE INSTANCE 1 (AUSL1) is DOWN !!!!!!!!!!" orclsupportdba@diamondresorts.com < inst1_notup.txt
echo "working" > crap
fi
if [ "$instance2" = "running" ]
then
/bin/mailx -s "AUSLIVE INSTANCE 2 (AUSL2) is DOWN !!!!!!!!!!" orclsupportdba@diamondresorts.com < inst2_notup.txt
fi
if [ "$instance3" = "running" ]
then
/bin/mailx -s "AUSLIVE INSTANCE 3 (AUSL3) is DOWN !!!!!!!!!!" orclsupportdba@diamondresorts.com < inst3_notup.txt
fi
Sy UK