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: sybrandb <sybrandb_at_gmail.com>
Date: 27 Oct 2006 05:58:10 -0700
Message-ID: <1161953890.152113.231100@m73g2000cwd.googlegroups.com>

On Oct 27, 2:41 pm, "Matthias Hoys" <a..._at_spam.com> wrote:
> "Brian Peasland" <d..._at_nospam.peasland.net> wrote in messagenews:J7rtsI.435_at_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,
> > BrianI think it's a bug. I had the same problem when trying to execute dbca
> scripts with ksh on AIX (I believe it was for Oracle 9.2.0.6).
> On Metalink there is a related published bug for HP-UX, but it doesn't
> mention other platforms, nor a fix : seehttps://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument....
>
> Matthias- Hide quoted text -- Show quoted text -

I can confirm (from a very recent install) dbca in Oracle 9iR2 for AIX generates csh code.
However in my case (AIX 5L3) setenv actually worked (in bash, I believe).

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Fri Oct 27 2006 - 07:58:10 CDT

Original text of this message

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