0

We keep only 30 days of SQL agent job history but due to the frequent execution of jobs, SSMS will experience the following timeout error when trying to view history for a given job:

Execution Timeout Expired.  
The timeout period elapsed prior to completion of the operation or the server is not responding. 
(.Net SqlClient Data Provider)

Is there a way to increase this timeout in SQL Management Studio 18.7.1?

2
  • 1
    Maybe you can use a custom query instead of to use the SSMS:sqljana.wordpress.com/2020/06/22/…
    – Esat Erkec
    Nov 3 '20 at 17:50
  • 1
    Would it also be possible to decrease the amount of time you save job history for, e.g. like 7 days? 30 days would produce a lot of redundant data for all the successful job runs. I'm just wondering what the business needs are to save so much redundant data?
    – J.D.
    Nov 3 '20 at 19:02
1

No unfortunately it is not possible. As @Newman mentioned, you can query the msdb.dbo.sp_help_jobhistory procedure to get the data back or you can adjust your jobs timeframe cutoff or total number of rows cutoff (whichever is more suitable to your business needs): https://docs.microsoft.com/en-us/sql/ssms/agent/resize-the-job-history-log?view=sql-server-ver15

1

You can try getting the same info using dbatools PowerShell module and see if that helps:

Get-DbaAgentJobHistory -SqlInstance sql2\Inst2K17 -StartDate '2017-05-22' -EndDate '2017-05-23 12:30:00'

More info about the parameters of the cmdlet can be found here so you can filter even more the result, if needed.

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.