orcun_turkec
asked on
Windows batch script to check if an oracle database and listener is up
Hi experts,
I' m using windows 2008 server, I need two DOS batch scripts to check if an oracle database and listener is up and to send an e-mail alert which includes computer name, date/time and a message that DB or Listener is down.
I' m using windows 2008 server, I need two DOS batch scripts to check if an oracle database and listener is up and to send an e-mail alert which includes computer name, date/time and a message that DB or Listener is down.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you
ASKER
As Bigboj said, I wrote a batch script as shown below ;
@echo off
qprocess oracle.exe
if not ERRORLEVEL 0 goto :oracle_down
:oracle_down
set MESS=%COMPUTERNAME% oracle.exe not running
goto mail
:mail
echo %MESS%
How can the sqlplus command ( sqlplus sys/xxxx as sysdba ) can be applied to this script?
And what are other tools or scripts except Blat application for sending mail ?