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: <oratune_at_aol.com>
Date: Fri, 29 Sep 2000 21:26:20 GMT
Message-ID: <8r31dg$iso$1@nnrp1.deja.com>

In article <8r2sut$elm$1_at_nnrp1.deja.com>,   Joseph T <jthvedt_at_my-deja.com> wrote:
> 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.
>

If it did you wouldn't need to invoke your .profile, would you? The oraenv script relies upon the current environment and since there is none cannot function properly. (I typed THAT V E R Y S L O W L Y so you might grasp the concept.)

> 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.
>

--
David Fitzjarrell
Oracle Certified DBA


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Sep 29 2000 - 16:26:20 CDT

Original text of this message

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