Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

sysjobhistory does not old older records

Posted on 2010-11-18
10
Medium Priority
?
1,071 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 70

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
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 
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 70

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 1000 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 70

Assisted Solution

by:Scott Pletcher
Scott Pletcher earned 1000 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

715 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