Showing posts with label following1. Show all posts
Showing posts with label following1. Show all posts

Monday, March 19, 2012

email notification on job status

In MSDE, since there is no sql mail, I am thinking of doing the following:
1. write a shell script which will query the sysjobhistory table to
determine if any job failed. If so, then an email about the failure is sent
out.
Question: What should my sql command and my mail command look like. I dont
have much experience in shell scripting or am not very familiar with MSDB
database either.
hi,
inquisite wrote:
> In MSDE, since there is no sql mail, I am thinking of doing the
> following:
> 1. write a shell script which will query the sysjobhistory table to
> determine if any job failed. If so, then an email about the failure
> is sent out.
> Question: What should my sql command and my mail command look like. I
> dont have much experience in shell scripting or am not very familiar
> with MSDB database either.
if an SMPT solution is viable, I'd resort on xp_smpt extended stored
procedure provided at http://sqldev.net/xp/xpsmtp.htm
you can then code your task's step to send a mail on success or failure..
SQL Server MVP Tibor Karaszi presents and describes such a feature at
http://www.karaszi.com/sqlserver/info_no_mapi.asp
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||SMTP solution is not available. That is why I wanted to send an email through
some script running on the server.
"Andrea Montanari" wrote:

> hi,
> inquisite wrote:
> if an SMPT solution is viable, I'd resort on xp_smpt extended stored
> procedure provided at http://sqldev.net/xp/xpsmtp.htm
> you can then code your task's step to send a mail on success or failure..
> SQL Server MVP Tibor Karaszi presents and describes such a feature at
> http://www.karaszi.com/sqlserver/info_no_mapi.asp
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
>
|||If an SMTP server is not available then how were you planing to send email?
Jim
"inquisite" <inquisite@.discussions.microsoft.com> wrote in message
news:D7FE12AC-C359-4B74-A8C6-E497686705CB@.microsoft.com...[vbcol=seagreen]
> SMTP solution is not available. That is why I wanted to send an email
> through
> some script running on the server.
> "Andrea Montanari" wrote: