View ALL job History

  • It seems a while back I had a script that showed me all job history EVER on the server. I know I can view the job history for the amount of time I've specified in the job history log but is there some way to view job history for a job since the job was created?

  • SQL Server Agent only stores a limited number of rows of history total and per job. That can be set using SSMS on the History tab of the SQL Server Agent properties or by running:

    USE [msdb]

    GO

    EXEC msdb.dbo.sp_set_sqlagent_properties @jobhistory_max_rows=10000,

    @jobhistory_max_rows_per_job=1000

    GO

    The default values are 1000 and 100, so you'll likely have a limited history available to you unless you changed those settings.

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

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