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 -> Help Shell Script Woes

Help Shell Script Woes

From: Van Messner <vmessnerNOvmSPAM_at_discovernet.com.invalid>
Date: Thu, 03 Feb 2000 13:03:45 -0800
Message-ID: <006fb0e0.68a5070d@usw-ex0106-047.remarq.com>


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" ;;

esac

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

Received on Thu Feb 03 2000 - 15:03:45 CST

Original text of this message

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