Who are these scripts for? You need to troubleshoot performance problems with SQL Server, and you need to do it now. You don't have time to track down a bunch of DMVs, figure out Extended Events, ...
INNER JOIN [msdb].[dbo].[sysjobsteps] sjs ON sjs.[step_uid] = sjsl.[step_uid] INNER JOIN [msdb].[dbo].[sysjobs] sj ON sj.[job_id] = sjs.[job_id] To set how VLDBs are handled, set @VLDBMode to 0 = ...
Stored procedures can speed up your code by reducing trips to your database -- even if you only have one SQL statement to execute. Here's how to speed up your application (and how to simplify your ...