August 11, 2011 at 4:23 am
How to Calculate the total execution time, CPU and memory Utilization of each job?
August 11, 2011 at 4:54 am
Of a SQL Agent Job or some other job (Windows Task, etc.) that uses SQL Server?
SQL Agent has job duration (and step duration) counts in the job history log. But hardware usage is best calculated using PerfMon while the job is running.
If it's just a query, you can turn on SET STATISTICS IO in the Tools -> Options setting for Query Execution (Advanced). That will give you some basics.
More details on what prompted this question would help us give you the correct answer for your situation, though.
August 11, 2011 at 5:00 am
There are 50+ odd SQL Jobs configured in the SQL Agent. We have our 2 jobs configured in the same server and our client in interested in knowing the amount of CPU and memory Utilized by these jobs?
August 11, 2011 at 5:07 am
It sounds like you need to run a combination of Profiler (or a server side trace) and PerfMon while these jobs are running so you can get these numbers. PerfMon, aka Performance Monitor, is a windows tool for monitoring hardware usage. It has a zillion counters to monitor memory and CPU usage, along with other things like IO. Profiler / Server Traces can give you the SQL statements being used, when they started, when they ended, etc. Which is more detailed than the job history duration property.
Start googling these terms and look up Profiler and Trace in SQL Server Books Online.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply