stored procedure to clear old job history?

  • I have a scheduled job in sql server agent which runs once a minute.

    I was wondering if theres a way I can delete the job history for it, as I can see it getting out of hand at some point (this job will run once a minute, 24 hours a day, 7 days a week, 52 weeks a year)

    I'm assuming theres probably a stored procedure I can run once a week to clear out old history.. I just dont know what it is..

    would appreciate it if someone can point me in the right direction.

    Thanks

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

    I long for a job where my databases dont have any pesky users accessing them 🙂

  • If you right-click on the Job Agent node in Management Studio, you can set the amount of history stored in the Job Agent properties.

    This is for all jobs, but if you just specify a number of history records it will cycle as needed.

Viewing 2 posts - 1 through 1 (of 1 total)

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