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

How do i get 'Last Execute' time NOT 'Last Run time' Expand / Collapse
Author
Message
Posted Thursday, September 12, 2013 2:39 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, August 21, 2014 10:33 AM
Points: 1,283, Visits: 2,959

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?
Post #1494371
Posted Thursday, September 12, 2013 3:03 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 7:21 PM
Points: 1,302, Visits: 2,787
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.
Post #1494377
Posted Thursday, September 12, 2013 3:10 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 7:21 PM
Points: 1,302, Visits: 2,787
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.
Post #1494380
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse