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 «««12345

Script to calculate when a job ended. Expand / Collapse
Author
Message
Posted Monday, April 1, 2013 11:29 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 9:44 AM
Points: 23,008, Visits: 31,498
Welsh Corgi (4/1/2013)
Well thank you. That is nice but I'm looking for is the Start Datetime, End Datetime and elapsed time for each step for a single job.


Yes, and the code I posted does that. I have compared the output for your code to the output from mine and it is identical on my system.

The table msdb.dbo.sysjobhistory contains the history for each job step.

And adding a WHERE clause to the query should not be a problem.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1437545
Posted Monday, April 1, 2013 11:34 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Monday, July 21, 2014 3:00 PM
Points: 4,175, Visits: 4,257
You know I just realized that and I was going to edit my post.

Thank you!


For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Post #1437546
« Prev Topic | Next Topic »

Add to briefcase «««12345

Permissions Expand / Collapse