job duration


I am checking "view history" of some job but the view history does not have any histroy records,its empty.The job is disabled couple of months back and I could see the last job run date from Event Viewer,which shows the last job is run 8 month back.How can I identify the duration of this job which is run 8 month back?

I am using sql2008r2 enterprise edition

Thank you
more ▼

asked Apr 04 '12 at 12:34 PM in Default

pits gravatar image

830 73 91 92

(comments are locked)
10|1200 characters needed characters left

3 answers: sort oldest
If the job completion was logged in the application log - then work out the difference between the logged date/time and the invocation date in the log message.
more ▼

answered Apr 04 '12 at 12:46 PM

Kev Riley gravatar image

Kev Riley ♦♦
50.7k 43 49 76

(comments are locked)
10|1200 characters needed characters left

I hate to sound like a commercial, but job management has always been an issue for me. I have done a couple things that may not help you in this case, but something you may want to look into.

  • There is a great job management tool in the SQL Sentry product. Some of the things that I really get a lot of use out of is the job duration alerts. Things like if this job runs 200% longer than average send me a note.
  • The other thing that I do is create a utility database, here I can keep a lot of my won history of jobs and a number of other useful things.

If you want more info abut either, let me know.

Chris Shaw
more ▼

answered Apr 04 '12 at 05:45 PM

Chris shaw gravatar image

Chris shaw
530 2 3 5

(comments are locked)
10|1200 characters needed characters left

Kev provides probably the best option.

But do you have a test server you could test it on? Also remember that in production any job duration measurements will only be rough ideas for future lengths of the jobs. Changing loads on the server, changing data sizes, increased fragmentation, and locking issues all make precise predictions for a job length very difficult.
more ▼

answered Apr 04 '12 at 09:21 PM

TimothyAWiseman gravatar image

15.5k 19 22 32

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Apr 04 '12 at 12:34 PM

Seen: 391 times

Last Updated: Apr 04 '12 at 09:21 PM