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: setenv usage

Re: setenv usage

From: Brian Peasland <dba_at_nospam.peasland.net>
Date: Fri, 27 Oct 2006 01:36:17 GMT
Message-ID: <J7rtsI.435@igsrsparc2.er.usgs.gov>


EdStevens wrote:
> Oracle 9.2 Std Edition on solaris
>
> Used dbca to create scripts for createing a new db, and noticed a
> couple of strange things using the resulting scripts. In the base
> script 'mysid.sh' we find this line:
>
> setenv ORACLE_SID mysid
>
> On the first attempt, this line failed because the directory containing
> setenv wasn't in my path. So I added it to the path, then just for
> grins executed the line manually, and got this:
>
> $ PATH=$PATH:/usr/oasys/bin
> $ setenv ORACLE_SID mysid
> cp: cannot create /home/oracle/pref/.environ: No such file or directory
> cp: cannot create /home/oracle/pref/.environ: No such file or directory
> $
>
> Huh? So I check the man page. There, the synopsis shows the command
> is available for csh, but not sh or ksh. But the Oracle genned script
> specifically runs under /bin/sh. What am I not understanding about
> this?
>
> Next step was to look at the equivilent scripts that I had used for
> createing new 9.2 databases at my last job. These scripts were also
> orginally genned with dbca, but had some manual work done after the
> fact. In those, I see that I followed the 'setenv' with:
>
> ORACLE_SID=mysid
> export ORACLE_SID
>
> So ... what exactly is setenv supposed to be doing for me that I'm not
> accomplishing by setting and exporting ORACLE_SID myself?
>
> Thanks.
>

The setenv command is a cshell command which does the same as the export command in sh or ksh. I'm not sure why you get the setenv command in a script that is created specifically for /bin/sh. That looks to be in error.

HTH,
Brian

-- 
===================================================================

Brian Peasland
dba_at_nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown
Received on Thu Oct 26 2006 - 20:36:17 CDT

Original text of this message

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