Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
  • how can I able to see all available records from SQL Agent Jobs, because in SSMS is dispayed only reduced number of records
  • are these records stored in system databases, not only in plain log files
  • how can I get records generated by SQL Agent Jobs only
  • is this history settable,

enter image description hereenter image description here

share|improve this question
up vote 6 down vote accepted

You need msdb.dbo.sysjobhistory and a few JOINs of course to read the data

To change how SQL Server Agent uses this table, use this stored procedure with suitable values

EXEC msdb.dbo.sp_set_sqlagent_properties
    @jobhistory_max_rows = 1000,
    @jobhistory_max_rows_per_job = 100
share|improve this answer
Guess he wants to configure the job history retention. – Mark Storey-Smith Jun 11 '13 at 12:48
+1 can't see forest through trees, thank you accepted – mKorbel Jun 11 '13 at 13:03

Yes you can very well change this though SSMS Right click SQL Server Agent and select Properties. The History Page lets you change

  1. Maximum job history log size(in Rows) --> Default is 1000.
  2. Maximum job history rows per job --> Default is 100.

Change them according to your need.

share|improve this answer
thank yout for answer +1 – mKorbel Jun 11 '13 at 13:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.