March 6, 2008 at 6:31 am
Hi All
I am looking for a script that I can run to get the run duration for some jobs running on a daily basis on SQL server 2000. Any ideas would be appreciated...
March 6, 2008 at 6:36 am
What is it exactly you're attempting to do?
SELECT * FROM msdb.dbo.sysjobs
SELECT * FROM msdb.dbo.sysjobhistory
All your information is in those two tables ... join the job_id's and you're good to go.
March 6, 2008 at 8:04 am
Adam, THANK YOU... I appreciate your quick reply, this should have been more obvious to me! (Brain cramp I guess...)
Brad Anderson
March 6, 2008 at 9:47 am
Adam, I thanked you and did not answer your question. I want to write a small script to test how long certain jobs run. The SP is written so that it will exit under certain conditions, attempt to run at the next hourly cycle and only run for a few seconds if the trouble has not been corrected. Modifying the vendor's SP is possible, but I don't want to become the owner of the SP after I mod it. So, I want to back-door the problem for now and test the run duration. I know how long the run should be on each cycle.
March 6, 2008 at 9:51 am
Good deal, if ya need any help, let me know.
Good luck!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply