SQL Server Agent- Get Avg Jobs Run Time

Problem Statement: Script to find average SQL Server Agent jobs run time. Solution: SET TRANSACTION isolation level READ uncommitted; WITH cte_AR      AS (SELECT j.NAME                                             AS ‘JobName’,                 Cast(( ( run_duration / 10000 * 3600 +                          ( run_duration / 100 )%100 * 60 +                                 run_duration%100                                 + 31 ) / 60.0 ) AS DECIMAL(18, 2)) AS[…]

Read more