Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re:Determining Oracle status

Re:Determining Oracle status

From: <DBarbour_at_austin.isd.tenet.edu>
Date: Tue, 18 Sep 2001 13:25:41 -0700
Message-ID: <F001.00391E0E.20010918130021@fatcity.com>

Dick,

I haven't seen oiconnect since v7x. I used to use it (as we've discussed here previously, tnsping and grepping processes for smon, pmon and the like won't provide you with a definitive answer for a variety of reasons), but have since switched to actually logging into the database via a script, running a stored procedure and logging out. If it fails, I'm alerted.

David A. Barbour
Oracle DBA, OCP
AISD
512-414-1002

                                                                                       
                       
                    dgoulet_at_vicr.c                                                     
                       
                    om                   To:     Multiple recipients of list ORACLE-L 
<ORACLE-L_at_fatcity.com>  
                    Sent by:             cc:                                           
                       
                    root_at_fatcity.c       Subject:     Re:Determining Oracle status     
                       
                    om                                                                 
                       
                                                                                       
                       
                                                                                       
                       
                    09/18/2001                                                         
                       
                    01:50 PM                                                           
                       
                    Please respond                                                     
                       
                    to ORACLE-L                                                        
                       
                                                                                       
                       
                                                                                       
                       




Barry,

    Do you get the IOUG-A mag? There was a piece of Pro*C code therein
(I'm the

author) that did exactly what you want, but does not use SQL*Plus. There is
also 'oiconnect' that should be in $ORACLE_HOME/bin.

Dick Goulet

____________________Reply Separator____________________
Author: Barry Deevey <Barry.Deevey_at_sefas.co.uk>
Date:       9/18/2001 7:45 AM

Hi all,

I am trying to write a script in unix that determines if a specific oracle instance is available. I'm trying to avoid using the 'ps' command, so I thought the easiest method would be to connect via sqlplus - If it connects its up, if it doesn't then its unavailable. However, the problem is that when it isn't up, the script hangs and does not return anything - I think that this is because sqlplus by default gives you 3 attempts to logon, so even though the logon attempt failed, it is waiting for you to try again, so
unfortunately I'm not getting a failed return code. If anybody could tell me how to change this so that it only allows 1 login attempt before 'kicking you out' or whether there is a better method to finding out the status of an instance, I would be extremely grateful to hear
from you.

TIA for any responses.

Best Regards,
Barry.

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Barry Deevey
  INET: Barry.Deevey_at_sefas.co.uk

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: dgoulet_at_vicr.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: DBarbour_at_austin.isd.tenet.edu Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Tue Sep 18 2001 - 15:25:41 CDT

Original text of this message

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