sorry my script is a UNIX script!

Orysia Husak
Database Management Services
perotsystems - CHW Phoenix
(602) 307-2896
(602) 300-9752 (Cell)


-----Original Message-----
Sent: Thursday, February 06, 2003 11:00 AM
To: Multiple recipients of list ORACLE-L


Could you post it to the list?

Igor Neyman, OCP DBA
[EMAIL PROTECTED]
  


----- Original Message ----- 
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Thursday, February 06, 2003 12:14 PM


> Bob,
> I have a very simple script which checks to see if the database is up and
> open. I've emailed you the script.
> 
> Orysia Husak
> Database Management Services
> PEROTSYSTEMS
> (602) 307-2896
> cell: (602) 300-9752
> 
> 
> -----Original Message-----
> Sent: Thursday, February 06, 2003 9:00 AM
> To: Multiple recipients of list ORACLE-L
> 
> 
> Good morning everyone Win2k pro, oracle 8.17
> 
> Ive been investigating a simple monitor script which will email me if
> the database is not available. I need this to be as simple as possible
> (ideally a batch file)
> 
> Ive come across this on orafaq
> http://www.orafaq.net/scripts/win/isdbup.txt
> 
> But dosnt seem to work. If you pass an incorrect sid, or file parameters
> the script just hangs
> 
> I have a modified version 
> ##############################################
> Rem dbup.bat
> @echo off
> set ORACLE_SID=locdb
> sqlplus internal/pw@%ORACLE_SID% @C:\conn.sql 
> 
> if {%ERRORLEVEL%} == {0} (
>    echo Database %ORACLE_SID% is available
> ) else (
>    echo Database %ORACLE_SID% is NOT available
> )
> ##############################################
> 
> [conn.sql]
> set echo off feed off pages 0  
> -- whenever sqlerror exit sql.sqlcode
> WHENEVER SQLERROR EXIT 1
> select * from global_name;       
> exit ;
> ##############################################
> 
> Although this works (gets into the error level) AFTER you hit enter to
> walk throough the errors
> The script gets stuck on Errors Such as 
> If the db is down
> ERROR:
> ORA-01034: ORACLE not available
> Enter user-name:
> ERROR:
> ORA-01017: invalid username/password; logon denied
> 
> Or if I pass and invalid sid, (I can live with only passing valid sids)
> but how can I get sql+ to exit out of the error if in fact the db is not
> up
> I think Ive tried all variations of SQLERROR 
> 
> http://lina.cli.di.unipi.it:8000/WG73-doc/sqlplus/sp33/ch646.html
> 
> Any ideas for the gurus??? 
> 
> Many thanks
> bob
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Bob Metelsky
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> San Diego, California        -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (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.net
> -- 
> Author: Husak, Orysia - Perot
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> San Diego, California        -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (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.net
-- 
Author: Igor Neyman
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (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.net
-- 
Author: Husak, Orysia - Perot
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (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).

Reply via email to