|
|
|
Forum 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
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 10:45 AM
Points: 4,007,
Visits: 4,851
|
|
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
|
|
|
|
|
Forum 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
|
|
|
|
|
Forum 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
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 8:41 AM
Points: 2,562,
Visits: 3,451
|
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 1:13 PM
Points: 3,578,
Visits: 5,119
|
|
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
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 11:16 AM
Points: 55,
Visits: 316
|
|
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!  ======================================================
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Sunday, May 19, 2013 12:38 AM
Points: 144,
Visits: 267
|
|
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.
|
|
|
|