Re: notification from windows

From: David Ramírez Reyes <dramirezr_at_gmail.com>
Date: Fri, 22 May 2015 10:08:11 -0500
Message-ID: <CAJt=wvWYDi=yNR17Z1n-raHv=N5bAiff5NeGpJgJE67+_hB59w_at_mail.gmail.com>



I have a job that checks the result of the last 3 full backups everyday, puts it on a txt file and sends it by email, you can use something like this on vbs file (does not require any installation):

Const ForReading = 1, ForWriting = 2, ForAppending = 8 Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject") 'Open the file for reading
Set f = fso.OpenTextFile("D:\Alarms\MN3P\output1.txt", ForReading) 'The ReadAll method reads the entire file into the variable BodyText BodyText = f.ReadAll
'Close the file
f.Close
Set f = Nothing
Set fso = Nothing
Set objEmail = CreateObject("CDO.Message")

objEmail.From = "mesdbas_at_xxxx.com"
objEmail.To = "mesdbas_at_xxxx.com"
objEmail.Subject = "MES MONT3 DAILY BACKUP REPORT"
objEmail.Textbody = BodyText
objEmail.Configuration.Fields.Item _

    ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objEmail.Configuration.Fields.Item _

    ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = " smtp.xxxx.com"
objEmail.Configuration.Fields.Item _

    ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objEmail.Configuration.Fields.Update
objEmail.Send

David Ramírez Reyes
Profesión: Padre de Familia

On 22 May 2015 at 08:33, Jeffrey Beckstrom <JBECKSTROM_at_gcrta.org> wrote:

> I use Blat to send smtp email on Windows.
>
> >>> "Zelli, Brian" <Brian.Zelli_at_RoswellPark.org> 5/22/15 9:10 AM >>>
>
> I am running a small batch script from windows to check if the instance is
> up or down. I want to email myself if it is down. I’ve googled a bunch of
> things(came up with VB, PowerShell, XML) but does anyone have an easy
> method for what they monitor oracle/windows with? Like a simple mail to:
> type process?
>
>
>
>
>
> Brian
>
>
>
>
>
> This email message may contain legally privileged and/or confidential
> information. If you are not the intended recipient(s), or the employee or
> agent responsible for the delivery of this message to the intended
> recipient(s), you are hereby notified that any disclosure, copying,
> distribution, or use of this email message is prohibited. If you have
> received this message in error, please notify the sender immediately by
> e-mail and delete this email message from your computer. Thank you.
>
>
> .
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri May 22 2015 - 17:08:11 CEST

Original text of this message