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: Joseph T <jthvedt_at_my-deja.com>
Date: Fri, 29 Sep 2000 20:10:09 GMT
Message-ID: <8r2sut$elm$1@nnrp1.deja.com>

Thank you very much. It helped, indeed; your post and that of Walter T Rejuney. Here's what I did.

in my .profile, I made oraenv conditional:

case $- in

    *i*) SIDLIST=`awk -F: '/^[^#]/{printf "%s ",$1} ' /etc/oratab`

            echo "SIDs on this machine are $SIDLIST"
            ORAENV_ASK=
            . /usr/lbin/oraenv
            ;;

esac

Now I source my .profile in the script. Since it isn't interactive, it skips oraenv. I call that in my script, just as I've been doing all along:

. /my_home_path/.profile
ORAENV_ASK=NO
ORACLE_SID=X
. /usr/lbin/oraenv
yada, yada, yada...

Bob's your uncle!

I'm still not clear as to why just calling /usr/lbin/oraenv in the script doesn't work. And before "oratune" pipes in again (imagine me typing v e r y s l o w l y)-- I KNOW that .profile sets env vars & the path that I need. However, as it relates to Oracle, I believe oraenv ALONE sets those things.

In article <8r0g3e$ro6$1_at_nnrp1.deja.com>,   kal121_at_my-deja.com wrote:
> 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.
> in your scripts.

[edit]

> HTH

--
Joseph Thvedt
jthvedt_at_my-deja.com


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Sep 29 2000 - 15:10:09 CDT

Original text of this message

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