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: db up script

RE: db up script

From: Ruiz, Mary A (CAP, CDI) <Mary.Ruiz_at_gecapital.com>
Date: Fri, 12 May 2000 09:47:04 -0400
Message-Id: <10495.105496@fatcity.com>


Lisa:

   Here are some lines from a script where I check if an Oracle 8i database is up.
oiconnect is not supported after Oracle 7.3.4. Also, the existence of the sgadef file does
not always imply that you can connect to the database.

            CONNECT=`sqlplus -s /nologin @${ORACLE_BASE}/local/connect_${ORACLE_SID}.sql`

            if [ "$CONNECT" = "Connected." ]
            then
                STATUS="-1"
            else
                STATUS="1"
            fi

      The connect_prod1.sql is something like this:
	set feedback off
	connect scott/tiger;
	exit

	Be careful that only the oracle account can read or write this file
because it contains passwd info.
	hth
	Mary Ruiz


> -----Original Message-----
> From: Lisa_Koivu_at_gelco.com [SMTP:Lisa_Koivu_at_gelco.com]
> Sent: Thursday, May 11, 2000 2:29 AM
> To: Multiple recipients of list ORACLE-L
> Subject: db up script
>
> Hello -
>
> Does anyone have a script that checks if a series of databases are up and
> available that they would be willing to share? I set out to write a ksh
> script
> to do this and found that I would have to write C to do what I needed to
> do,
> since trying to connect to a hung or down instance will result in a hung
> process. There wasn't an easy way to fire off the connect process, sleep,
> and
> kill it if it hadn't come back yet. I really don't want to spend my day
> writing
> C code, it will exacerbate the headache my job gave me today.
>
> Any suggestions / script snippets are appreciated
> Thanks
> Lisa
>
>
>
> --
> Author:
> INET: Lisa_Koivu_at_gelco.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).
Received on Fri May 12 2000 - 08:47:04 CDT

Original text of this message

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