If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > LISTing TASK HISTORY

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-10-09, 10:45
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
LISTing TASK HISTORY

Hello Everybody,

Is there a way to list the HISTORY of ther scheduled tasks in DB2.


Please help - I need to write a script to list all runs and return status of a scheduled job.


Thanks
DBFinder
Reply With Quote
  #2 (permalink)  
Old 03-10-09, 11:10
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
platform/version ???
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 03-10-09, 12:37
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
db2 v8.1.12

and

db2 v9.1.3
Reply With Quote
  #4 (permalink)  
Old 03-10-09, 14:36
yvanroy yvanroy is offline
Registered User
 
Join Date: Jun 2002
Posts: 12
History for the last 5 days:

select h.TASKNAME00 as TaskName
,h.START00 as StartTime
,h.END00 as EndTime
,h.RETURNCODE00 as ReturnCode
from toolscat.MDTHISTORYTY00 h
where h.START00 > current timestamp - 5 days
;
Reply With Quote
  #5 (permalink)  
Old 03-10-09, 15:29
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Thanks a lot.

But on my system instead of
toolscat.MDTHISTORYTY00, systools.MDTHISTORYTY00

worked.
Thanks for help yvanroy
DBFinder
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On