locked
Turn off job history for certain jobs RRS feed

All replies

  • Hi, no it is not possible to specify jobs.

    As an alternative, you could look at using the following http://msdn.microsoft.com/en-us/library/ms179338.aspx (if you need regular deletes for specific jobs then possibly look into using profiler to capture how management studio is performing this delete task and schedule the code in a reoccurring job).

    Thursday, March 15, 2012 10:32 PM
  • As already pointed-out by Kevin you may not be able to configure this , SQL server agent jobs have got this enabled for a reason so as to identity any issues if a job or a particular step in a job has failed. The tables like sysjobhistory and sysjobsteplogs have these information , if you want to not store any history for a particular job you would have to use the SP sp_purge_jobhistory and use the job name as parameter to clear them up by specifying oldest date option on a periodic fashion.

    Thanks, Leks

    • Proposed as answer by amber zhang Monday, March 19, 2012 3:16 AM
    Sunday, March 18, 2012 5:54 AM
  • Hello Allan,

    SQL Agent jobs cannot be configured to turn off job history. Please report this request at https://connect.microsoft.com/SQLServer/Feedback

    Is there a specific requirement where you would like to turn off job history logging for a specific job / set of jobs?. We would like to understand your scenario better so that we can work on possible alternate workarounds with current version of SQL Server.

    Thanks 

    Sethu Srinivasan [MSFT]

    SQL Server

    http://blogs.msdn.com/sqlagent

    Monday, March 26, 2012 5:27 PM
  • Someone before me create all these jobs that run like every second. So they fill up the logs. We do not want to keep 100,000 records for each job but we would have to do something like this just so these jobs that run every second don't take up the history.

    Alan

    Monday, March 26, 2012 5:46 PM
  • Hello,

    Not to get off topic, but I would question why there are so many jobs with a high rate of runs. It may be better to turn them into functional requirements rather than after thoughts. If you could take a job and make it part of the database (trigger, SB service, etc) or edit a stored procedure to correct the issue, I would do so.

    -Sean

    Monday, March 26, 2012 6:22 PM
    Answerer
  • I agree whole heatedly but I don't have the time right now to redevelop that. I really don't understand why they did it that way in the first place.

    Alan

    Monday, March 26, 2012 7:43 PM