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 > How to kill or force a running task

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-27-07, 16:37
James Frankman James Frankman is offline
Registered User
 
Join Date: Feb 2004
Posts: 24
Question How to kill or force a running task

I have a SQL MERGE statements that are scheduled from the DB2 task center. I have found that usually the merge statement takes about 0-5 minutes to complete. But every once in a while the task will take one or more hours. Sometimes the task seems to hang indefinatelly. I would like to note here that the task essentially runs over the same amount of data each day (about 300,000 rows) The frustrating thing is that I cannot figure out what is causing this behavior. What is worse, I cannot figure out how to kill or end the task once it is running. Can someone answer the following questions:

1. How do you end (force) a long running task that was invoked from the task center?
2. Other than the "Show Results" item in the task's context menu how can I diagnose a task the failes or runs abnormally long?
3. If a task normally takes less than five minutes but all of the sudden begin to take hours to complete? Could this be a locking issue? If so how do I find out?
Reply With Quote
  #2 (permalink)  
Old 09-27-07, 17:01
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
1) same way to force any application. use the FORCE APPLICATION command.
2) use the monitors (snapshot and event) to diagnose the problem. Also generate access plans for the SQL to see if maybe an incorrect access path is being generated. A good and free snapshot monitor is located at:

http://chuzhoi_files.tripod.com/index.html

3) Yes it could be a locking issue. See number 2 to figure it out.

Andy
Reply With Quote
  #3 (permalink)  
Old 09-27-07, 17:25
James Frankman James Frankman is offline
Registered User
 
Join Date: Feb 2004
Posts: 24
Thanks for the tips. I will try out the monitor. In the mean time how to I find out what the agent id of the running task is?
Reply With Quote
  #4 (permalink)  
Old 09-28-07, 07:50
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
What OS and DB2 version?

Andy
Reply With Quote
  #5 (permalink)  
Old 09-28-07, 11:52
James Frankman James Frankman is offline
Registered User
 
Join Date: Feb 2004
Posts: 24
os: windows 2003
db2 version 9.1
Reply With Quote
  #6 (permalink)  
Old 09-28-07, 12:00
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Use the free snapshot monitor I mentioned earlier. You can even force the application from it.

Andy
Reply With Quote
  #7 (permalink)  
Old 09-28-07, 12:03
James Frankman James Frankman is offline
Registered User
 
Join Date: Feb 2004
Posts: 24
ok. Thanks. That tool helped alot.
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