Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to see one week before job history Expand / Collapse
Author
Message
Posted Monday, June 20, 2011 2:31 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, June 21, 2011 12:32 PM
Points: 5, Visits: 9
Hello:

I have a agent job running. When I right click this job to view history, only show me current day job history. How to see one week ago job history?

Thanks
Post #1128555
Posted Monday, June 20, 2011 2:40 PM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Friday, April 18, 2014 8:32 AM
Points: 4,056, Visits: 5,182
Maybe the SQL Agent job history log size is set too small. In SSMS, Right-click on SQL Server Agent and select Properties. Select History and adjust the maximum job history log size and rows per job.

Greg
Post #1128565
Posted Monday, June 20, 2011 3:12 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, June 21, 2011 12:32 PM
Points: 5, Visits: 9
Thanks.

Is any script to get detailed failed job step a week ago from sys archive table like view history gui
Post #1128583
Posted Monday, June 20, 2011 3:35 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, June 21, 2011 12:32 PM
Points: 5, Visits: 9
Hello:

I run this script

SELECT j.[name],
s.step_name,
h.step_id,
h.step_name,
h.run_date,
h.run_time,
h.sql_severity,
h.message,
h.server
FROM msdb.dbo.sysjobhistory h
INNER JOIN msdb.dbo.sysjobs j
ON h.job_id = j.job_id
INNER JOIN msdb.dbo.sysjobsteps s
ON j.job_id = s.job_id
AND h.step_id = s.step_id
WHERE h.run_status = 0 -- Failure
AND h.run_date > 2011-06-15
ORDER BY h.instance_id DESC

I have failed job, but I did not get any result. Where I missed. Thanks
Post #1128597
Posted Tuesday, June 21, 2011 12:07 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, March 14, 2014 2:19 AM
Points: 2,820, Visits: 3,916
may be some tweak required here
AND h.run_date > 2011-06-15



-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1128755
Posted Wednesday, June 22, 2011 9:27 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 5:07 PM
Points: 4,128, Visits: 5,840
get a copy of the awesome free tool SQLJOBVIS. Shows agent history as a gantt chart. Great for finding overlaps!

Best,

Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru at GMail
Post #1129777
Posted Thursday, December 20, 2012 1:50 PM


Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, November 15, 2013 9:03 AM
Points: 55, Visits: 355
TheSQLGuru (6/22/2011)
get a copy of the awesome free tool SQLJOBVIS. Shows agent history as a gantt chart. Great for finding overlaps!


Be leary about this SQLJOBVIS web page. Google flagged it as suspicious due to malware being put on your web page when you visit it.

Too bad. The software looks very helpful and to boot it's free. Wish they'd clean up their web page.



======================================================
John
SQL Server 200x Newb and proud of it!
======================================================
Post #1399100
Posted Friday, December 28, 2012 9:32 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Friday, April 04, 2014 12:20 AM
Points: 728, Visits: 339
Set up the Job History Log by time period

Connect to Sql Server Instance and right click the Sql Server Agent and select the Properties page. In the SQL Server Agent Properties dialog box select the History page.

Choose Automatically remove agent history, and specify a time period, history older than this period will be purged from the log.
Post #1401115
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse