Ad Code

check list of all the SQL Server running jobs

How to check list of all the SQL Server running jobs

Senior IT Managers commonly questioned us to check a list of all the jobs that were currently running on the server.

If we have a huge database with thousands of SQL Agent Jobs, the DBA is also responsible for closely monitoring every active SQL Server Agent Job.

The T-SQL script below returns data on all active SQL Agent Jobs.

 

SELECT

            SJ.Name

            ,SJ.job_ID

            ,SJA.run_requested_Date   

FROM msdb.dbo.sysjobs AS SJ

INNER JOIN msdb.dbo.sysjobactivity AS SJA

            ON SJ.job_id = SJA.job_id

WHERE SJA.run_requested_date IS NOT NULL

            AND SJA.stop_execution_date IS NULL

Post a Comment

0 Comments

Close Menu