Job History clearing

  • Hi there

    I have a SQL Server that clears it's Job History every morning sometime after 5 am. it clears out completely, but I can't find a job of scheduled task that does it. I need the log to work out why jobs are failing so I need to stop it but can't see how it is doing it.

    Any help would be much appreciated

  • Check agent properties. There should be a chechbox to auto remove job history.

    --Vadim R.

  • Thanks for that, I have checked in the Agent properties>history page and the option to clear the history is not set.

    To try to track it I ran a job every 10 mins overnight and the logs are there from 5:10 am so something is clearing the history at 5:00am, but I can't find any jobs or scheduled tasks that run at that time that would clear it.

  • under sql agent - properties - history there is also a setting for limit size of job history log. This defaults to 1000 so if you have a lot of jobs, or jobs that run frequently this soon fills, so increase that value.

    ---------------------------------------------------------------------

  • Could it be ..

    - Maintenance plan;

    - External job scheduled in windows;

    If I'm not mistaken, job history usually deleted by this procedure: sp_purge_jobhistory. Try to trace who is calling it using profiler.

    ...Just a few thoughts.

    --Vadim R.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply