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: Tuesday, April 01, 2014 3:44 PM
Points: 1,266, Visits: 2,912

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: Friday, April 18, 2014 4:12 PM
Points: 1,194, Visits: 2,666
Check [cmdexec_success_code] in [msdb].[dbo].[sysjobhistory].

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


----------------------------------------------------------------------------
My LinkedIn profile - LinkedIn
Sacramento SQL Server users group - http://sac.sqlpass.org
My blog - http://www.expressnetsolutions.com/sqldch
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: Friday, April 18, 2014 4:12 PM
Points: 1,194, Visits: 2,666
Misread, you wanted the time.

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


----------------------------------------------------------------------------
My LinkedIn profile - LinkedIn
Sacramento SQL Server users group - http://sac.sqlpass.org
My blog - http://www.expressnetsolutions.com/sqldch
Follow me on Twitter - @SQLDCH
----------------------------------------------------------------------------

Yeah, well...The Dude abides.
Post #1494380
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse