If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Shell script and Oracle9i RAC

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-01-05, 23:54
xblackbox xblackbox is offline
Registered User
 
Join Date: Feb 2005
Posts: 3
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
Reply With Quote
  #2 (permalink)  
Old 02-02-05, 00:16
vgersh99 vgersh99 is offline
Registered User
 
Join Date: Apr 2004
Location: Boston, MA
Posts: 325
would using tnsping help in anyway? [hint]
__________________
vlad
+-----------------------+
| #include <disclaimer.h> |
+-----------------------+
Reply With Quote
  #3 (permalink)  
Old 02-02-05, 00:22
xblackbox xblackbox is offline
Registered User
 
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!
Reply With Quote
  #4 (permalink)  
Old 02-02-05, 00:30
vgersh99 vgersh99 is offline
Registered User
 
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
__________________
vlad
+-----------------------+
| #include <disclaimer.h> |
+-----------------------+

Last edited by vgersh99; 02-02-05 at 00:34.
Reply With Quote
  #5 (permalink)  
Old 02-02-05, 00:49
xblackbox xblackbox is offline
Registered User
 
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!
Reply With Quote
  #6 (permalink)  
Old 02-02-05, 01:04
vgersh99 vgersh99 is offline
Registered User
 
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On