﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Gregory Larsen / Article Discussions / Article Discussions by Author  / Nightly Failed Jobs Report / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 22 May 2013 06:37:35 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>How to configure this if we are using the other xpxp_smtp_sendmail I am not able to generate the full report...the report of nightly jobs</description><pubDate>Fri, 20 Feb 2009 16:16:05 GMT</pubDate><dc:creator>mohammed moinudheen</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>Not a bad solution. I've done something similar, but I let each server query itself and store the results in a table. Then I have a master server that queries all these servers (use DTS, transform task) to roll up all information.Couple things I found on jobs:1.  Don't like to do steps. I just want to know what failed. I can dig in if it's important. Also, for some jobs this gets cumbersome, like log dumps. We dump every 15 minutes. Having that fail all night really munges up the report, so I only report a single failed instance.2. I store the last time I ran the report. Why? If the report job fails today and I spend a day getting it fixed, I want to get the report to return everything I may have missed, so I'll want more than a days worth of data. Plus this handles weekends as well.Steve Jonessjones@sqlservercentral.comhttp://www.sqlservercentral.com/columnists/sjones</description><pubDate>Thu, 19 Dec 2002 15:52:00 GMT</pubDate><dc:creator>Steve Jones - SSC Editor</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>Not exactly sure what you are trying to do, but seems that if you know the job_id, then you can always uses the sysjobs table to get the jobname.Gregory Larsen, DBAIf you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples</description><pubDate>Tue, 12 Nov 2002 09:28:00 GMT</pubDate><dc:creator>Greg Larsen</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>BTW, does anyone know how to include the name of a job in the subject of an email? msdb..sysjobhistory doesn't get updated until the job is complete (run_time). Does anyone know if this is possible?thanks </description><pubDate>Sun, 10 Nov 2002 20:33:00 GMT</pubDate><dc:creator>tmftrauma</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>This is a nice solution if you only want to followup the sql-server-stuff. We use HP-openview-managex/HP-OperationsW to followup the nt-eventlogs of our servers. All our jobs report failings to the eventlog.Jobi </description><pubDate>Thu, 07 Nov 2002 01:29:00 GMT</pubDate><dc:creator>ALZDBA</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>sorry perhaps i should clarify (since sp_sendmail is in house). Since our datawarehouse domain is seperate and not a trustee of our administration domain, xp_sendmail requires an exchange server (or other MAPI mail server) in the same domain. Thus we created sp_sendmail which doesn't include the @query function so Greg's script requires some tweaking. I'm almost complete with a stored proc that includes the name of the failed job in the subject. We use a DTS package for a weekly failed job report. </description><pubDate>Wed, 06 Nov 2002 17:49:00 GMT</pubDate><dc:creator>tmftrauma</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>Hi, Great scripting, Greg. I am searching for an alternative to using xp_sendmail (we don't use it due to 1 way trust from data warehouse to domain with exchange). Perhaps a version of sp_sendmail that allowed the @query! Hmmm.. </description><pubDate>Thu, 31 Oct 2002 12:29:00 GMT</pubDate><dc:creator>tmftrauma</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>Good point.  If I add that to the script some day, then I'll make sure I post it.Gregory Larsen, DBAIf you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples</description><pubDate>Fri, 20 Sep 2002 07:29:00 GMT</pubDate><dc:creator>Greg Larsen</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>HiDont forget jobs that are "still" running, ie.  havent finished from when they where scheduled to run at 1am for example and its now 10am, this is a classic item that is easily skipped by the DBA but can result in major problems.CheersChris </description><pubDate>Thu, 19 Sep 2002 21:58:00 GMT</pubDate><dc:creator>ckempste</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>Looks like lots of good methods to accomplish the samething.  Betsy - I would like the script that uses the linked servers.Gregory Larsen, DBAIf you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples</description><pubDate>Thu, 19 Sep 2002 08:19:00 GMT</pubDate><dc:creator>Greg Larsen</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>We do the same thing with a DTS package that uses an ActiveX script to log into each of our 41 servers and query msdb.  The results are written out to our web server so I just need to look at the web page each morning.  No linked servers necessary. </description><pubDate>Thu, 19 Sep 2002 06:49:00 GMT</pubDate><dc:creator>TomBrattin</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>If its not too long, post the code here, or you can add to the script library.Andyhttp://www.sqlservercentral.com/columnists/awarren/</description><pubDate>Thu, 19 Sep 2002 06:13:00 GMT</pubDate><dc:creator>Andy Warren</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>We do a similar thing - check several different servers for failed jobs nightly. We have one job on a master server that queries MSDB on the other servers (yes, we use linked servers). Each step in the job runs the query on a different server and appends the results to a text file. The last step is to mail the text file. It's simplistic, but pretty easy to maintain and use. If anyone wants the code, let me know.Betsybirdies95@hotmail.com</description><pubDate>Thu, 19 Sep 2002 05:59:00 GMT</pubDate><dc:creator>Betsy Rogers</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>Good Idea.  I'm working on retrofitting my report process and other automated DBA process to run from a single server and monitor multple servers.  I also am having problems getting it to work across all our servers.  Maybe I'll consider re-writing in SQLDMO.  Thanks for the tip.....Gregory Larsen, DBAIf you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples</description><pubDate>Wed, 18 Sep 2002 07:38:00 GMT</pubDate><dc:creator>Greg Larsen</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>GregI required a similar solution to monitor failing jobs, but across multiple SQL Servers. I ended up writing a script using SQLDMO to get this done. I don't think you would be able to do this using TSQL unless you used linked servers (which wasn't possible in my environment).Good article.RegardsJulian </description><pubDate>Tue, 17 Sep 2002 21:57:00 GMT</pubDate><dc:creator>netgroper</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>Dave's explaination is exactly the reason why I used a global temp table.  Dave I think you are right on regarding a different connection.  I think this is because you could be logged on as user "XYZ123", but when you run xp_sendmail it runs under the MSSQLSERVER account to send the mail.  Therefore a new connection "must" be established to send the mail.-------------------------Gregory Larsen, DBAIf you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples</description><pubDate>Mon, 16 Sep 2002 07:58:00 GMT</pubDate><dc:creator>Greg Larsen</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>&lt;BLOCKQUOTE id=quote&gt;&lt;font size=1 face="Verdana, Arial, Helvetica" id=quote&gt;quote:&lt;hr height=1 noshade id=quote&gt;Only question I had was do you need global temp table rather than plain?Andy&lt;hr height=1 noshade id=quote&gt;&lt;/BLOCKQUOTE id=quote&gt;&lt;/font id=quote&gt;&lt;font face="Verdana, Arial, Helvetica" size=2 id=quote&gt;I have found that xp_sendmail does not like accessing standard temp tables that were created outside of it. I presume that this is caused by xp_sendmail running as a seperate connection, and therefore being unable to access the temp table that the job has created. I find that a similar problem occurs with variables.Have you any suggestions as to how this difficulty might be overcome? (or, failing that, a better understanding of what might be causing this?)Dave.</description><pubDate>Mon, 16 Sep 2002 02:05:00 GMT</pubDate><dc:creator>Dave Green</dc:creator></item><item><title>RE: Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>Greg, thats a great idea, wish I had thought of it! Im getting to that point, lots of jobs and lots of email, and beyond that processes that run on various non SQL machines that still have to be monitored. This is a good start. Only question I had was do you need global temp table rather than plain?Andyhttp://www.sqlservercentral.com/columnists/awarren/</description><pubDate>Sun, 15 Sep 2002 18:47:00 GMT</pubDate><dc:creator>Andy Warren</dc:creator></item><item><title>Nightly Failed Jobs Report</title><link>http://www.sqlservercentral.com/Forums/Topic6801-90-1.aspx</link><description>Comments posted to this topic are about the content posted at &lt;A HREF=http://www.sqlservercentral.com/columnists/glarsen/failed_jobs.asp&gt;http://www.sqlservercentral.com/columnists/glarsen/failed_jobs.asp&lt;/A&gt;</description><pubDate>Sun, 15 Sep 2002 00:00:00 GMT</pubDate><dc:creator>Greg Larsen</dc:creator></item></channel></rss>