|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Tuesday, July 31, 2007 8:20 AM
Points: 885,
Visits: 1
|
|
Hi
Dont 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.
Cheers
Chris
Chris Kempster www.chriskempster.com Author of "SQL Server Backup, Recovery & Troubleshooting" Author of "SQL Server 2k for the Oracle DBA"
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Saturday, January 19, 2013 8:28 AM
Points: 1,038,
Visits: 255
|
|
Good point. If I add that to the script some day, then I'll make sure I post it.
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
Gregory A. Larsen, MVP
Need SQL Server Examples check out my website at http://www.sqlserverexamples.com
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, November 28, 2003 12:00 AM
Points: 3,
Visits: 1
|
|
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..
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, November 28, 2003 12:00 AM
Points: 3,
Visits: 1
|
|
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.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 2:17 AM
Points: 6,862,
Visits: 8,049
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, November 28, 2003 12:00 AM
Points: 3,
Visits: 1
|
|
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
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Saturday, January 19, 2013 8:28 AM
Points: 1,038,
Visits: 255
|
|
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, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
Gregory A. Larsen, MVP
Need SQL Server Examples check out my website at http://www.sqlserverexamples.com
|
|
|
|
|
SSC-Dedicated
           
Group: Administrators
Last Login: Yesterday @ 3:30 PM
Points: 31,436,
Visits: 13,751
|
|
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 Jones sjones@sqlservercentral.com http://www.sqlservercentral.com/columnists/sjones
Follow me on Twitter: @way0utwest
 Forum Etiquette: How to post data/code on a forum to get the best help
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 7:43 PM
Points: 2,174,
Visits: 3,586
|
|
How to configure this if we are using the other xp
xp_smtp_sendmail
I am not able to generate the full report...the report of nightly jobs
Mohammed Moinudheen
|
|
|
|