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

Re: Help Shell Script Woes

From: Ms. D.H. Harvey <qq45_at_liverpool.ac.uk>
Date: 4 Feb 2000 11:51:04 GMT
Message-ID: <87eef8$1kt$1@news.liv.ac.uk>


My guess is that you are executing your script rather than sourcing it.

HTH Helen

Van Messner (vmessnerNOvmSPAM_at_discovernet.com.invalid) wrote:
: 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

: * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
: The fastest and easiest way to search and participate in Usenet - Free!
Received on Fri Feb 04 2000 - 05:51:04 CST

Original text of this message

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