January 5, 2010 at 11:49 am
Try sysjobschedules.
January 5, 2010 at 11:50 am
You can get pretty much the same information from the sysjobhistory table, which is in both SQL 2000 and SQL 2005. Look at run_date, run_time, and run_duration.
If you're interested in current rather than historical data, use sysjobschedules as Lynn suggested.
Greg
January 5, 2010 at 11:59 am
Hi,
Thanks for the replies !!!
The sysjobschedules doesn't provide me when the job started and finished information. Also, I am not looking for the next run date or last run date information.
I need the table or something which gives me the information like :
When actually the SQL Agent job started and what time it finished.
This information I can get in SQL Server 2005 by quering the sysjobacitivity table with the start_execution_time and stop_execution_time columns.
Regards,
Sree
January 5, 2010 at 12:06 pm
You'll have to use the sysjobhistory table and compute the end date/time using the run_date, run_time, and run_duration columns.
January 5, 2010 at 12:15 pm
Thank you Lynn for your reply
I will work on this and will update again if I have any other issues.
Thank You Again,
Sree
January 6, 2010 at 12:34 pm
Please try the attached SP.
MJ
January 6, 2010 at 1:07 pm
Hi Manu,
Thank you very much for providing me with the SP.
I have a crazy doubt, please correct me if I am wrong.
Is the date and time shows the time at which the job finished executing ?
Regards,
Sree
January 6, 2010 at 1:19 pm
Is the date and time shows the time at which the job finished executing ?
Yep.
Manu
January 6, 2010 at 1:31 pm
Thank you once agian for your valuable SP.
I was in the middle of writing a SP to get the job start time and end time in SQL Server2000, now I can use your SP and modify it to get the result what I am looking for.
Regards,
Sree
Viewing 9 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply