How can I view full SQL Job History? How can I view full SQL Job History? sql-server sql-server

How can I view full SQL Job History?


The SQL Server Job system limits the total number of job history entries both per job and over the whole system. This information is stored in the MSDB database.

Obviously you won't be able to go back and see information that has been since discarded, but you can change the SQL Server Agent properties and increase the number of entries that will be recorded from now on.

In the SQL Server Agent Properties:

  • Select the History page
  • Modify the 'Maximum job history log size (rows)' and 'Maximum job history rows per job' to suit, or change how historical job data is deleted based on its age.

It won't give you back your history, but it'll help with your future queries!


I'm pretty sure job history is stored somewhere in a dedicated database in SQL Server itself. If this is the case, you can use SQL Server Profiler to intercept SQL statements sent by SQL Server Management Studio and find out names of tables, etc.


Your outcome depends on a couple of things.

  1. What you've set your "Limit size of job log history" and "Automatically remove agent history" settings [right click on SQL Agent | Properties | History] and
  2. whether or not you are doing a "History Clean Up" task in a Maintenance Plan (or manually for that manner). The MP task runs the msdb.dbo.sp_purge_jobhistory stored procedure with an "oldest date" parameter which equates to the period you have selected.