Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: oraenv and cron

Re: oraenv and cron

From: <kal121_at_my-deja.com>
Date: Thu, 28 Sep 2000 22:18:29 GMT
Message-ID: <8r0g3e$ro6$1@nnrp1.deja.com>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US