mully 0 Newbie Poster

hope someone can help...

I am trying to run a script via cron. the script runs fine interactively when logged in as oracle user. The script should run a hot back up of the database(oracle, RHEL3) of course the oracle sid and home path are set when running it manually. but when i run it as a cron job, it fails with error: egrep -c -e "^$ORACLE_SID:" $ORATAB
++ egrep -c -e '^:'
+ ''
+ echo 'ERROR:Database not in Oratab File '
/var/opt/mpower/bin/resback.sh: line 537: ${ERROR_FILE}: ambiguous redirect
+ exit

there is an entry in /etc/oratab for the db in question. I have also tried to run the .bash_profile in the script to supply the variables, i also tried to set them as cinstants in the script but no joy either.

i know its a big ask, but i have attached the script i am running it reads from the HOT BACKUP section of the script.

cheers

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.