1
  • 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

6

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
2
3

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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