SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 SP_WHO2 active
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mikebird
Aged Yak Warrior

United Kingdom
529 Posts

Posted - 09/03/2009 :  06:52:18  Show Profile  Reply with Quote
Once running this and monitoring the CPU Time on a job, is it possible to keep history of the CPU Time used on a job once it's complete, or amount used per second, so I can tell the scope of how much I tax the processors?

I'm running all sorts of jobs on SSME as well as different types of apps as well, mostly Crystal Reports, and I need to know the scope of these, and how to manage them simultaneously...

robvolk
Most Valuable Yak

USA
15655 Posts

Posted - 09/03/2009 :  09:20:58  Show Profile  Visit robvolk's Homepage  Reply with Quote
You can create a log table with the same structure as the sp_who2 output, then add a job step at the end with the following:

INSERT LogTable EXEC sp_who2 @@spid

If you log each step you can compare CPUTime and determine how much each step used.
Go to Top of Page

mikebird
Aged Yak Warrior

United Kingdom
529 Posts

Posted - 09/03/2009 :  10:54:36  Show Profile  Reply with Quote

Nice idea. Done. Of some use

Edited by - mikebird on 09/03/2009 11:19:50
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000