Management Studio "Log History" Retention

  • We have a weekly (sql agent) job. When I look at its history under Management Studio > SQL Server Agent > right-click Jobs > View History only shows two history records. I would like to change the settings so at least a month's worth of history (4 records) is displayed. But where is that setting kept?

    TIA,

    Barkingdog

  • I believe that the SQL jobs stores 254 rows of history.

    Check to make sure that the job has not fired off only two times. And also that someone has not deleted all the history. Also, make sure the job itself is not removing the history when it is finished.

    Andrew SQLDBA

  • Barkingdog (8/20/2010)


    We have a weekly (sql agent) job. When I look at its history under Management Studio > SQL Server Agent > right-click Jobs > View History only shows two history records. I would like to change the settings so at least a month's worth of history (4 records) is displayed. But where is that setting kept?

    SQL Server Agent --> Properties --> History tab is where you can change this

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • The default settings of the SQL Server Agent is usually not adequate. There are two options in that dialog, the first one defines how many rows will be kept for all jobs - the second defines how long to keep history. Warning, the second option is not a setting - but just runs the history cleanup for the specific time frame.

    What I do is un-check the first item and build a maintenance plan with the History Cleanup task in it only. I schedule that daily at 12:01 and set it to keep 6 months of history. You can adjust the amount you keep for your systems.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

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

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