Results 1 to 12 of 12

Thread: SQL Job History ???

  1. #1
    Join Date
    Aug 2004
    Posts
    188

    Question SQL Job History ???

    I have a question about the sql job history. I have a sql 2000 server that was recording all the job history on my sql jobs just fine until the other day. Today I checked the history and the jobs didnt show the past history anymore. Just today's history. So if the job didnt run today there is no history for that particular job. This isn't true, the job was run a few days ago. I know that no one went in and cleard the history on the jobs. What causes this issue, is there a way to not make this happen in the future? Is there a way I can recover the past history for my jobs.

    Thanks for your time!! TIA

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Did anyone go to the sql agent properties and clear the log or changed the number of rows to 0 and change it back to default?

    You can restore msdb database and see sysjobhistory table.

  3. #3
    Join Date
    Aug 2004
    Posts
    188
    Thanks for the response, As far as I know no one on my DBA team changed anything in the agent properties. If i restore the msdb database i will lose today's history correct.

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    Sql agent keeps 1000 most recent job history entries by default, you can increase it or set unlimit in sql agent properties -> job system tab.

  5. #5
    Join Date
    Aug 2004
    Posts
    188
    If the job history has a limit of rows the default is 1000 rows. Once this limit is reached does the log get reset? This might explain it.

  6. #6
    Join Date
    Aug 2004
    Posts
    188

    Question

    Wouldn't it make sense that the log wouldnt clear itself but just get rid of the oldest event and continue to write to the log fine?

  7. #7
    Join Date
    Sep 2002
    Posts
    5,938
    That's what sql agent does, delete old history entries from msde..sysjobhistory. Those deleted entries maybe for same job.

  8. #8
    Join Date
    Aug 2004
    Posts
    188
    right, say you have 100 jobs; you look at the job history for all jobs and the past history was cleard for some reason. Now you only see the history for the jobs that ran today. why whould that happen if no one cleared the log?

  9. #9
    Join Date
    Sep 2002
    Posts
    5,938
    Since sql only holds 1000 most recent job history entries by default, it'll delete old entries automatically.

  10. #10
    Join Date
    Aug 2004
    Posts
    188

    Angry

    today i logged into the server to see if the 18th job history date was still in the jobs. Nope! just says the 19th and didnt keep the 18th. Any ideas? This one has me

  11. #11
    Join Date
    Sep 2002
    Posts
    5,938
    How many rows do you have in msdb..sysjobhistory?

  12. #12
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Check the count of rows in sysjobhistory. May be some jobs are running too frequently and taking up all available rows in sysjobhistory.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •