Click here to monitor SSC
SQLServerCentral is supported by Redgate
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
Posted Monday, April 1, 2013 11:29 AM



Group: General Forum Members
Last Login: Today @ 11:12 AM
Points: 23,522, Visits: 37,747
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



Group: General Forum Members
Last Login: Yesterday @ 10:38 AM
Points: 5,066, Visits: 4,844
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...

For better answers on performance questions, click on the following...

Post #1437546
« Prev Topic | Next Topic »

Add to briefcase «««12345

Permissions Expand / Collapse