SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 View job history
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sravanim
Yak Posting Veteran

58 Posts

Posted - 07/29/2013 :  06:40:39  Show Profile  Reply with Quote
How to see the job history more than a week?

ahmeds08
Aged Yak Warrior

India
667 Posts

Posted - 07/29/2013 :  06:51:37  Show Profile  Send ahmeds08 a Yahoo! Message  Reply with Quote
this may help
http://weblogs.sqlteam.com/tarad/archive/2009/06/10/SQL-Server-Script-to-Display-Job-History.aspx

mohammad.javeed.ahmed@gmail.com
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 07/29/2013 :  07:04:05  Show Profile  Reply with Quote
You also have Job Steps Execution History report among standard list of reports available from SQL Management Studio by selecting SQL Server agent and choosing option Reports -> Standard Reports -> Job Steps Execution History

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

James K
Flowing Fount of Yak Knowledge

3719 Posts

Posted - 07/29/2013 :  09:02:13  Show Profile  Reply with Quote
quote:
Originally posted by visakh16

You also have Job Steps Execution History report among standard list of reports available from SQL Management Studio by selecting SQL Server agent and choosing option Reports -> Standard Reports -> Job Steps Execution History

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs


Standard Job Steps Execution History report that I am familiar with show only 7 days activity. For periods earlier than that, you have to use something similar to what Tara's blog showed, or even right click on the jobs node under SQL Server Agent and view history.

Is there an option or setting that would let you configure the standard Job Steps Execution History to show more than a week's worth of data?
Go to Top of Page

jeffw8713
Aged Yak Warrior

USA
799 Posts

Posted - 07/29/2013 :  14:52:23  Show Profile  Reply with Quote
If you are using the default settings for SQL Server Agent - you may not even be able to go back that far for all jobs. The default settings only allow for a maximum of 1000 rows for the whole table - and 100 rows for individual jobs.

All it takes is one job running every 10 seconds to push your history out of the table.

The other option on that page (Agent Properties - History) is a one-time option. It runs the purge process when you close the window by hitting OK. To get the same functionality you can either create a maintenance plan with a single task (History Cleanup) and configure it for how much history you want to keep - or you can schedule a custom cleanup executing the procedure(s):

msdb.dbo.sp_delete_backuphistory
msdb.dbo.sp_purge_jobhistory
msdb.dbo.sp_maintplan_delete_log

Look in BOL for each procedures available parameters.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000