SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SCOME - Part 3: The Failed Jobs Report


SCOME - Part 3: The Failed Jobs Report

Author
Message
Drew Salem
Drew Salem
SSC Veteran
SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)

Group: General Forum Members
Points: 204 Visits: 172
Comments posted to this topic are about the item SCOME - Part 3: The Failed Jobs Report
Drew Salem
Drew Salem
SSC Veteran
SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)

Group: General Forum Members
Points: 204 Visits: 172
Hi all,

There appears to be a dead image in the article, so I've posted the image here. This is what our Failed Jobs report will eventually look like. It has three buttons that will retrieve the relevant logs on the server. Remember, all the work in the previous articles is not just for the one report. It's just part of the initial setup. After this, you'll be able to create a report from anything SQL Server holds in it's system tables for all your servers, with minimal effort.


bas de zwart
bas de zwart
SSC-Enthusiastic
SSC-Enthusiastic (180 reputation)SSC-Enthusiastic (180 reputation)SSC-Enthusiastic (180 reputation)SSC-Enthusiastic (180 reputation)SSC-Enthusiastic (180 reputation)SSC-Enthusiastic (180 reputation)SSC-Enthusiastic (180 reputation)SSC-Enthusiastic (180 reputation)

Group: General Forum Members
Points: 180 Visits: 293
We've been using a different variant on this, first there's a job that runs every hour that mails us the results of the following view:


SELECT CONVERT(DATETIME, RTRIM(H.run_date)) + ((H.run_time * 9 + H.run_time % 10000 * 6) + H.run_time % 100 * 10) / 216e4 AS run_date, J.name,
H.message, H.run_duration, H.server
FROM LINKED_SERVER_NAME.msdb.dbo.sysjobhistory AS H INNER JOIN
[SRV-NAV01].msdb.dbo.sysjobs AS J ON H.job_id = J.job_id
WHERE (H.step_id = 0) AND (H.run_status = 0)



This also works like a charm and is easy to set up. You can either pro-actively monitor the view, or have a job schedule mail these results to you (like we did). You can simply UNION select any production server (linked) that you'd like or take it one step further and use CLR to enumerate through all available servers.
Andrei Ignat
Andrei Ignat
SSC Journeyman
SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)

Group: General Forum Members
Points: 99 Visits: 79
Shameless plug : please see the project on http://www.codeplex.com/sqlconsolidate - it does the same on a console application * and can export data to csv/xml/ email / database

Andrei Ignat
.NET Teacher | .NET Videos 5 minutes
LostFromTheStart
LostFromTheStart
Valued Member
Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)

Group: General Forum Members
Points: 50 Visits: 108
COOL STUFF SO FAR. WHEN WILL YOU GET INTO THE .NET STUFF
Drew Salem
Drew Salem
SSC Veteran
SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)

Group: General Forum Members
Points: 204 Visits: 172
LostFromTheStart (4/24/2009)
COOL STUFF SO FAR. WHEN WILL YOU GET INTO THE .NET STUFF


Was going to do it in article 5, but people are getting restless, so going to try and do it next.
Misha_SQL
Misha_SQL
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1200 Visits: 1009
Excellent series! I especially like that I can build on this type of infrastructure and extend it further (and don't have to pay for expensive 3rd party tools :-)).



gary.dunn
gary.dunn
SSC Rookie
SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)

Group: General Forum Members
Points: 40 Visits: 113
Great stuff so far. When will part 4 be posted?
Drew Salem
Drew Salem
SSC Veteran
SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)

Group: General Forum Members
Points: 204 Visits: 172
Hi Gary,

I'll try and finish the next three articles this weekend and publish them on my site thebuddingdba.com, Monday. I'll send them off to SQLServerCentral.com but I think there is a three or four week wait.

Kind regards

Drew
gary.dunn
gary.dunn
SSC Rookie
SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)

Group: General Forum Members
Points: 40 Visits: 113
Thanks Drew, we're looking forward to the new articles.
Quick question: We have set up links to several servers that just have the default instance installed and it works great...however, how can we set up servers with named instances? For example, we have a SQL Server farm with 9 named instances. How can we link to each of the named instances for monitoring?

Thanks.

Gary and Ann
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search