How can you find the SQL Server jobs that start simultaneously?

Category: Performance
Item: SQL Agent jobs starting simultaneously.

Why should you care about them?

Multiple SQL Server Agent jobs are configured to start simultaneously, which will not perform as fast as if jobs would not overlap.

Your SQL Server may be under heavy load for short bursts of time.

How can I find the SQL Server jobs that start simultaneously?

You can use the script below to list all Agent SQL Server jobs starting at precisely at the same time.

  1. SELECT j.name As JobName,
  2.  j.description AS JobDescription,
  3.  a.start_execution_date AS JobStartExecutionDate
  4. FROM msdb.dbo.sysjobs j
  5. INNER JOIN msdb.dbo.sysjobactivity a ON j.job_id = a.job_id
  6. WHERE j.enabled = 1 AND a.start_execution_date IN
  7. (SELECT start_execution_date
  8. FROM msdb.dbo.sysjobactivity
  9. GROUP BY start_execution_date HAVING COUNT(*) > 1)
Figure 1 -SQL Server Agent Jobs starting Simultaneously.

How to fix them?

  1. Spread job execution tweaking the job schedules.

More information

Microsoft – dbo.sysjobactivity.

Mark Varnas

Mark Varnas

I love making performance tuning SQL Servers fast and making them more stable. And I channel that obsession into our SQL Managed Services and new content here. When I'm not writing about SQL, I spend time outside hiking, skiing, mountain biking, or trying a new recipe.

Leave a Reply

Your email address will not be published. Required fields are marked *