Solved

sysjobhistory does not old older records

Posted on 2010-11-18
10
1,043 Views
Last Modified: 2012-05-10
this is in sql 2000...

i basically want to see when was the last time a DTS package was run successfully which would be a year ago..

when i checked the above it has only 1000 entries.. is there a way i can look at the ones past the first 1000 records.. it is sorted by date desc..

thanks
0
Comment
Question by:anushahanna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
10 Comments
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 34167170
Yes, there's a default option that limits the job to 1000 entries.  You can change that to increase it to whatever you want.
0
 
LVL 30

Expert Comment

by:Rich Weissler
ID: 34167197
Check for the default limit under the properties of the SQL Server Agent Properties.
Unfortunately the ones that have already been truncated are gone.

JobHistoryLimit.JPG
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34167441
thanks for showing how to increase the limit..

now that i can't find through sysjobhistory, is there any other option to get a hint when it might have been run last?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 30

Expert Comment

by:Rich Weissler
ID: 34167702
If you don't care success/failure of the last run -- you can run:
select last_run_date from sysjobsteps where step_name='<jobname>'
It outputs as YYYYMMDD (their is a last_run_time field as well, if you need that.)
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34170885
Rzamus, it seems like the DTS package was never setup as a job.. so I do not see it in sysjobsteps... does SQL keep track when DTS packages are run manually..?
0
 
LVL 30

Expert Comment

by:Rich Weissler
ID: 34171332
I looked through all the DTS package tables yesterday, and didn't see anywhere where it tracked the run dates separately.  At best it has the various saved versions when the packages are modified/saved.
0
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 34173995
sysjobhistory stores job *and* step history, so all job history goes into that table.
0
 
LVL 30

Accepted Solution

by:
Rich Weissler earned 250 total points
ID: 34174201
@ScottPletcher - Thanks.  The problem in this case, sysjobhistory was being truncated to 1000 lines, which is the default.  I mentioned sysjobsteps as a possible location of last resort to get a possible last run date, because it does seem to store that information there as well in some instances.  Given that the information anushahanna is looking for is not in sysjobsteps, and has already been truncated from sysjobhistory - are you aware of ANOTHER different location this information might reside?
0
 
LVL 69

Assisted Solution

by:Scott Pletcher
Scott Pletcher earned 250 total points
ID: 34175332
No, there is no other standard location where past history is stored.

The only possibiity would be to recover the job history from the msdb tran log and/or tran log backups, assuming they were all available.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34191208
i gave a try with msdb TLB but too late.

at least now we have a better threshold (than 1000)

thanks very much for your help.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
I have a large data set and a SSIS package. How can I load this file in multi threading?
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question