Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL Server 2000 Job History Run Duration Expand / Collapse
Author
Message
Posted Thursday, March 06, 2008 6:31 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, May 27, 2010 8:30 AM
Points: 9, 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...
Post #465081
Posted Thursday, March 06, 2008 6:36 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 8:57 AM
Points: 1,145, Visits: 1,926
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.

Post #465088
Posted Thursday, March 06, 2008 8:04 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, May 27, 2010 8:30 AM
Points: 9, Visits: 31
Adam, THANK YOU... I appreciate your quick reply, this should have been more obvious to me! (Brain cramp I guess...)

Brad Anderson
Post #465178
Posted Thursday, March 06, 2008 9:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, May 27, 2010 8:30 AM
Points: 9, 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.
Post #465300
Posted Thursday, March 06, 2008 9:51 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 8:57 AM
Points: 1,145, Visits: 1,926
Good deal, if ya need any help, let me know.

Good luck!


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

Post #465305
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse