T-SQL:
Select sj.Name as 'Job Name', suser_sname(owner_sid) as 'Job Owner', sja.Session_ID, DateDiff(mi,sja.Start_Execution_Date, GetDate()) as 'Run-Time (mi)', sja.Start_Execution_Date, sja.Stop_Execution_Date FROM msdb.dbo.sysjobs sj INNER JOIN msdb.dbo.sysjobactivity sja ON sj.job_id = sja.job_id WHERE sja.start_execution_date Is Not Null AND sja.stop_execution_date Is Null
|
|
|
|
|