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: Matthias Hoys <anti_at_spam.com>
Date: Fri, 27 Oct 2006 14:41:33 +0200
Message-ID: <4541fe7b$0$31472$ba620e4c@news.skynet.be>

"Brian Peasland" <dba_at_nospam.peasland.net> wrote in message news: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,
> Brian

I 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 : see https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=BUG&p_id=2392762.

Matthias Received on Fri Oct 27 2006 - 07:41:33 CDT

Original text of this message

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