Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Server 2000 Job History Run Duration


SQL Server 2000 Job History Run Duration

Author
Message
Brad Anderson-284887
Brad Anderson-284887
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
Points: 19 Visits: 31
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...
Adam Bean
Adam Bean
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1545 Visits: 2160
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.

---
SQLSlayer
Making SQL do what we want it to do.
Brad Anderson-284887
Brad Anderson-284887
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
Points: 19 Visits: 31
Adam, THANK YOU... I appreciate your quick reply, this should have been more obvious to me! (Brain cramp I guess...)

Brad Anderson
Brad Anderson-284887
Brad Anderson-284887
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
Points: 19 Visits: 31
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.
Adam Bean
Adam Bean
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1545 Visits: 2160
Good deal, if ya need any help, let me know.

Good luck!

---
SQLSlayer
Making SQL do what we want it to do.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search