Do not log job history

  • Hi,

    My SQL Server instances have some jobs that run very frequently ( some execute at every 30 seconds ) and these jobs are consuming all my job history log size and I am losing the history of my main jobs.

    I already did some research and found how to increase this log size, but the best would be if I could say to not log some jobs' output. I did some some research, but I did not find anything about it.

    Does anyone know if this is possible?

    Thanks!

  • I actually modify the default Agent history settings so that noisy jobs do not force important job history to be deleted. I have a job on all my instances that calls sp_purge_jobhistory to delete history for all jobs older than n-days (depends on instance) and if there are noisy jobs I might call it again for those specific jobs with a shorter retention period.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Thanks!

  • another option i have seen is that if you have a job that is run once a minute and its not triggered by any thing (DB stats logging in my example) is to set it up like follows

    WHILE 1=1

    BEGIN

    DO STUFF

    WAITFOR DELAY '00:01:00'

    END

    That way the job "Runs" once a minute but you dont get the log clutter.


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

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

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