Which system tables gives SQL Agent jobs start time and stop time in SQL Server 2000

  • Try sysjobschedules.

  • 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

  • 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

  • You'll have to use the sysjobhistory table and compute the end date/time using the run_date, run_time, and run_duration columns.

  • 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

  • Please try the attached SP.

    MJ

  • 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

  • Is the date and time shows the time at which the job finished executing ?

    Yep.

    Manu

  • 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