Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> setenv usage
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. Received on Thu Oct 26 2006 - 16:12:51 CDT