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 > Deleted Tasks in Task Center Still Run

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-31-09, 10:37
James Frankman James Frankman is offline
Registered User
 
Join Date: Feb 2004
Posts: 24
Question Deleted Tasks in Task Center Still Run

The past three weeks I have struggled with a task that was scheduled in Task Center to perform a table reorg every weekend. The task started to cause the transaction log to fill up, so I disabled the task, hoping to find out why the table reorg caused the transaction log to fill up. However, before I could research this, the next weekend the #$@#$$% task still ran, so I decided to delete the task altogether from the task center. Now this weekend the task still ran. It appears that even though the task no longer shows up in Task Center it is alive and well in order to torment be each Monday when I come into work with a full transaction log. Is there a way besides Task Center for me hunt down this task and kill it once and for all?
Reply With Quote
  #2 (permalink)  
Old 08-31-09, 12:57
Stealth_DBA Stealth_DBA is offline
Registered User
 
Join Date: May 2009
Posts: 472
James Frankman, the following will update the Tools Database tables directly. I have found this to work for me (when a task indicated it was still running but it really wasn't) and am not sure if it will work for you. Use at your own risk (back up the ToolsDB to be safe).
Code:
SELECT OBJECT_ID, NEXTSTARTDATETIME00
     , STARTTIME00, STATUS00
     , RTRIM(NEEDRESCHEDULE00) AS NEEDRESCHEDULE00
FROM SYSTOOLS.MDTASKEXECTY00
Look in the STATUS00 an NEEDRESCHEDULE00 columns. Find the row that is not like the rest (probably STATUS00 is not equal to 1). In my situation they contained 3 and 0, respectively. Using the OBJECT_ID for that row, Update the table and set STATUS00 = 1 and NEEDRESCHEDUL00 = 1
Code:
SELECT OBJECT_ID, RTRIM(STATE00) AS STATEOO NUMBEROFEXECUTIONS00
FROM SYSTOOLS.MDTASKTYPE00
Look at the STATEOO and NUMBEROFEXECUTIONS00 columns. Find the row that is not like the rest (probably STATEOO not equal to 1) Mine were 2 and 1. Using the OBJECT_ID for that row, Update the table and set STATEOO = 1 and NUMBEROFEXECTUIONS00 = 0 (this may need to be 1 less the what is in the table instead of 0).
Code:
SELECT OBJECT_ID, END00, DURATION00, RUNNINGSTATUS00
FROM SYSTOOLS.MDTHISTORYTY00
Look at END00, DURATION00 and RUNNINGSTATUS00. Find the row that is not like the rest (probably END00 NULL and/or RUNNINGSTATUS00 not equal to 1) Mind had valuse of NULL, 0, and 3. Using the OBJECT_ID, update the row and set END00 to some past date (after the task started. An Hour in the past will work), Duration00 to some number (this is the execution time. Any number will work), and RUNNINGSTATUS00 = 1.

This worked to set the TOOLS Database and a V8.2 system to values that indicate the task is finished and not executing.
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