RE: notification from windows
Date: Fri, 22 May 2015 15:48:27 +0000
Message-ID: <7DCF5A73984B85409A1FB7B957E590ED8B38423E_at_EXMB1rsc.roswellpark.org>
Do I save this as a .bat file? I did find something like this from googling but that didn’t work. After I made some changes with the FROM and TO and the smtp, this didn’t work either. Or do I save it as something else and run it differently?
Brian
From: David Ramírez Reyes [mailto:dramirezr_at_gmail.com]
Sent: Friday, May 22, 2015 11:08 AM
To: JBECKSTROM_at_gcrta.org
Cc: oracle-l (oracle-l_at_freelists.org); Zelli, Brian
Subject: Re: notification from windows
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<mailto:mesdbas_at_xxxx.com>" objEmail.To = "mesdbas_at_xxxx.com<mailto: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<http://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<mailto:JBECKSTROM_at_gcrta.org>> wrote: I use Blat to send smtp email on Windows.
>>> "Zelli, Brian" <Brian.Zelli_at_RoswellPark.org<mailto: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.
.
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-lReceived on Fri May 22 2015 - 17:48:27 CEST