Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: checkdb up/down script for Windows
"Chuck" <skilover_nospam_at_bluebottle.com> wrote in message news:90utg.16831$Wh7.9408_at_trnddc07...
> Matthias Hoys wrote:
>>> Jigar2Reshma_at_gmail.com wrote: >>>> Hey everyone : I wanted to see if any one can suggest me or pass any >>>> windows related script tp me on ho to check if an Oracle database on >>>> windows is up/down. if down then send email. I am not a windows expert >>>> but i can write a little batch script. >>>> >>>> any help is appreciated. >>>> >>>> thanks >>>> >>> The first thing I do on any Windows system is install a copy of CygWIN >>> so I can use a *real* command line. >>> >>> As a couple of other posters have already stated, depending on the >>> version of Oracle you installed either OEM or Grid Control already does >>> this for you. >>
>>
>> >> > > With VBS, can I run sqlplus and pipe the output to a filter? Or launch > sqlplus in background and interactively communicate with it? > > VBS is worlds better than batch files but IMO it still doesn't hold a > candle to cygwin or a real unix shell.
Yes, you can run external programs from within a VBS script with the wscript.shell object.
Example (should work for sqlplus also) :
set oSh = createObject("Wscript.shell")
ret = oSh.run("%comspec% /c dir >dir.out",0,true)
As for your second question (running sqlplus in the background), I have no clue how to do this with vbs but I wouldn't be surprised if it was possible - it's more powerful than most people think (actually, it's not vbs that's so powerful, it's the whole Windows Script Host environment; vbs is just a language used to access WSH objects, you could also use another language like JavaScript for example).
Matthias Received on Thu Jul 13 2006 - 14:35:17 CDT
![]() |
![]() |