-
I read the following shell script from "Oracle DBA 8i Handbook". Because my Unix knowleage is very limited, something I don't understand.
Script:
ORACLE_SID=CC1; export ORACLE_SID
ORAENV_ASK = NO; export ORAENV_ASK
. ORAENV
cd /orasw / dba /CC1
svrmgrl << EOF
connect internal
startup;
!sqlplus / @inserts
shutdown
EOF
Questions: What's meaning the following environment variable ?
ORAENV_ASK = NO;export ORAENV_ASK
. ORAENV
what's the EOF meaning?
[Edited by Rechard on 07-19-2001 at 08:49 PM]
-
he exports ORAENV_ASK, which is certainly used in the file ORAENV.
. ORAENV means that you 'source' the script named ORAENV, that is to say you execute the script, and env variables defined in the script stay defined in your own environment.
EOF is because he is using :
svrmgrl << EOF
which means that the execution of the program svrmgrl will end when EOF will be met at the beginning of a line
-
IIRC, the ORAENV_ASK variable when set to NO means that the oraenv script will not prompt the user for the Oracle SID that they wish to set, but will instead take the value from the ORACLE_SID environment variable.
If set to Yes, then the script will display the current ORACLE_SID value as a default value in a prompt, asking the user to either confirm the value, or enter a new SID.
HTH
David.
-
Thank you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|