How do i get 'Last Execute' time NOT 'Last Run time'

  • I know i can get the last run time from job history, in this case the job history is deleted. However if i right click the job property it does show me 'Last Execute' time, how do i get this value using a query?

  • Check [cmdexec_success_code] in [msdb].[dbo].[sysjobhistory].

    http://technet.microsoft.com/en-US/library/ms187387(v=sql.105).aspx

    ----------------------------------------------------------------------------
    Sacramento SQL Server users group - http://sac.sqlpass.org
    Follow me on Twitter - @SQLDCH
    ----------------------------------------------------------------------------

    Yeah, well...The Dude abides.
  • Misread, you wanted the time.

    Look in [msdb].[dbo].[jobactivity]. It looks like you want [stop_execution_date].

    ----------------------------------------------------------------------------
    Sacramento SQL Server users group - http://sac.sqlpass.org
    Follow me on Twitter - @SQLDCH
    ----------------------------------------------------------------------------

    Yeah, well...The Dude abides.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply