Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2005
    Posts
    3

    Unanswered: Shell script and Oracle9i RAC

    I want use a script to check all instance in a RAC database, and listener from a node. Anyone have a script, please show me!
    Thanks!
    THANKS

  2. #2
    Join Date
    Apr 2004
    Location
    Boston, MA
    Posts
    325
    would using tnsping help in anyway? [hint]
    vlad
    +-----------------------+
    | #include <disclaimer.h> |
    +-----------------------+

  3. #3
    Join Date
    Feb 2005
    Posts
    3
    Please tell me more, please.
    I want make sure all of instance in RAC is available using a script! That is similar a script to check listener and instance in a single server. Please!

  4. #4
    Join Date
    Apr 2004
    Location
    Boston, MA
    Posts
    325
    don't know much about RAC......
    for tnslistener, you can use 'tnspint $SID'
    for 'instance' you can you try to connect with sqlplus and try to 'select from dual'. Something like this should get you started - modifying USER/PASSWD:

    Code:
    #!/usr/bin/ksh
    typeset -irx TRUE=0
    typeset -irx FALSE=1
    
    USER='myUser'
    PASSWD='myPasswd'
    
    function Is_Oracle_OK
    {
       if   print "
             select dummy||'OK' from dual;
             " | sqlplus -s ${USER}/${PASSWD} | grep -q XOK
       then return ${TRUE}
       fi
       return ${FALSE}
    }
    
    if   Is_Oracle_OK
    then print "Oracle is up"
    else print "Oracle is down"
    fi
    http://www.tek-tips.com/faqs.cfm?fid=2218
    Last edited by vgersh99; 02-02-05 at 01:34.
    vlad
    +-----------------------+
    | #include <disclaimer.h> |
    +-----------------------+

  5. #5
    Join Date
    Feb 2005
    Posts
    3
    I want use srvctl.
    to make sure all instance in RAC is OPEN status, I dont know much about shell script, please show me the way to use ouput of srvctl, and of the results of v$active_instances view. THANKS!

  6. #6
    Join Date
    Apr 2004
    Location
    Boston, MA
    Posts
    325
    how would you use srvctl from the command line?
    what would it be its sample output?
    what desired end result would you like to have base on the sample output of srvctl?

    Try unswering these questions and maybe check the Oracle forum - they might already have an FAQ or something.

Posting Permissions

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