Scheduled jobs email notification failures

  • quote:


    It's the system guys! Don't start adding variables such as patches, etc. but rather did deeper as to what environmental system changes have occurred just before it stopped working properly.


    While generally I agree with this statement, the problem we often face as DBAs is we only have control of our systems. We don't have control of things like Exchange Servers, the network, etc. Sometimes we have to put in workarounds to make stuff work even though whatever changed wasn't our fault. It's part of the gven and take of any IT staff.

    K. Brian Kelley

    bkelley@sqlservercentral.com

    http://www.truthsolutions.com/

    K. Brian Kelley
    @kbriankelley

  • Andy,

    I'd the same stack problem.

    I read all the messages in this topic.

    I would like to give you another KB article with a fix for this problem (but I didn't experience it):

    http://support.microsoft.com/default.aspx?scid=kb;en-us;Q320407

    Another thing I discovered : the package containing the sendmail task must be saved on the sqlserver in order to take the mapi profile of the server, not the mapi profile of the admin workstation.

    I hope it will help you.

  • There is an alternative to installing Outlook 2k on your server & using the SQLAgentMail.  It requires a little bit of scripting but it's not hard at all... only took me 2 hours including debugging brain farts in my code and working through a slow VPN tunnel.  I only needed one table, one stored procedure and one job.  You must use an extended stored procedure that has become very popular "xp_smtp_sendmail"; it can be found online.  By using the sysjobhistory table in the msdb database you can create a system that periodically (5 min in my case) checks the sysjobhistory table for failures that it hasn't seen before by analyzing the unique identifier in the sysjobhistory table and emailing them to you.  You can either 100% reproduce the same email that SQLAgentMail sends or modify it to your liking.  I will share the code with anyone although it's really nothing that couldn't be reproduced in an hour or 2 of your own time.  The table that I use has one column & never more than one row... only used to maintain the unique identifier of the last failure emailed.

    Brian Flynn

    bflynn@battech.com

  • Hi Brian ,

    Would you please share the code.

     

Viewing 4 posts - 16 through 18 (of 18 total)

You must be logged in to reply to this topic. Login to reply