Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: oraenv and cron
I also have multiple SIDs on one machine. I think what you need in your .profile is a check to see if the shell is interactive or not. This is the check that I perform in my .bash_profile:
# are we an interactive shell?
if [ "$PS1" ]; then
echo "The SIDs on this machine are:"
cat /var/opt/oracle/oratab | awk -F: '{print $1}' | grep -v "#"
ORAENV_ASK=YES
export ORAENV_ASK
. oraenv
fi
I believe something like this will solve your problem! My scripts run from crontab under Oracle with no problems. I also have a config file that lists all the SIDs I wish to run scripts for, then inside my shell scripts I loop through the entries in that file. This is cool way to run scripts for multiple instances without having to hardcode anything in your scripts.
HTH
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Sep 28 2000 - 17:18:29 CDT
![]() |
![]() |