In this post, I am sharing one more script related to SQL Server Agent JOB.
In our reporting environment, one day I was facing performance issue. During my investigation, was found that one of the SQL Agent JOB was creating problems.
Because of JOB scheduling problems, one of the SHRINK database related JOB started in working hours which created performance issue.
If we have large system with lots of SQL Agent Jobs, The DBA is also very much responsible to keep an eye on all running SQL Server Agent Jobs.
Below T-SQL script, returns the information on all running SQL Agent Jobs.
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
Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.
If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.
I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.