A shell script for monitoring, something I don't understand
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: A shell script for monitoring, something I don't understand

  1. #1
    Join Date
    Jul 2001
    Posts
    8

    Angry

    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]

  2. #2
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    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

  3. #3
    Join Date
    Feb 2001
    Posts
    123
    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.

  4. #4
    Join Date
    Jul 2001
    Posts
    8

    Smile Thank you



    Thank you guys!

    Rechard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width