User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 427,190 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,231 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 1050 | Replies: 0
Reply
Join Date: Oct 2007
Posts: 1
Reputation: mully is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mully mully is offline Offline
Newbie Poster

script fails when run via cron

  #1  
Oct 21st, 2007
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 '^:'
+ '[' 0 -ne 1 ']'
+ echo 'ERRORatabase 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
Attached Files
File Type: txt resback.txt (18.4 KB, 3 views)
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Shell Scripting Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Shell Scripting Forum

All times are GMT -4. The time now is 10:08 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC