Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Help Shell Script Woes
The following shell script does not reset the ORACLE_SID
environment variable. What am I doing wrong. This is a Bourne
shell on Sun Solaris.
#!/bin/sh
echo "Type the SID for the database you want to shut down"
echo "Your choices are DNEG GSP2 GSPD ORCL"
read dbsid
case $dbsid
in
DNEG) echo "van dneg" ;; GSP2) echo "van gsp2" echo "$dbsid" ORACLE_SID=$dbsid export ORACLE_SID ;; *) echo "no SID entered" ;;
If I run the script and respond with GSP2:
The case statement works - I get the echo messages.
$dbsid is what I expect - I can see it from the echo statement
and what I see is GSP2
Thus I assume the assigment to ORACLE_SID is ok.
But when I look at my environment variables, the ORACLE_SID is
not changed to GSP2.
Can anyone think why not?
Thanks,
Van
![]() |
![]() |